Class: Google4R::Checkout::ItemInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/google4r/checkout/shared.rb

Overview

ItemInfo instances are used in Line-item shipping commands

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(merchant_item_id) ⇒ ItemInfo

Returns a new instance of ItemInfo.



1242
1243
1244
1245
# File 'lib/google4r/checkout/shared.rb', line 1242

def initialize(merchant_item_id)
  @merchant_item_id = merchant_item_id
  @tracking_data_arr = Array.new
end

Instance Attribute Details

#merchant_item_idObject (readonly)

The merchant item id (String)



1237
1238
1239
# File 'lib/google4r/checkout/shared.rb', line 1237

def merchant_item_id
  @merchant_item_id
end

#tracking_data_arrObject (readonly)

An array of tracking data for this item



1240
1241
1242
# File 'lib/google4r/checkout/shared.rb', line 1240

def tracking_data_arr
  @tracking_data_arr
end

Instance Method Details

#create_tracking_data(carrier, tracking_number) ⇒ Object



1247
1248
1249
1250
1251
# File 'lib/google4r/checkout/shared.rb', line 1247

def create_tracking_data(carrier, tracking_number)
  tracking_data = TrackingData.new(carrier, tracking_number)
  @tracking_data_arr << tracking_data    
  return tracking_data
end