Class: Google4R::Checkout::ItemInfo
- Inherits:
-
Object
- Object
- Google4R::Checkout::ItemInfo
- Defined in:
- lib/google4r/checkout/shared.rb
Overview
ItemInfo instances are used in Line-item shipping commands
Instance Attribute Summary collapse
-
#merchant_item_id ⇒ Object
readonly
The merchant item id (String).
-
#tracking_data_arr ⇒ Object
readonly
An array of tracking data for this item.
Instance Method Summary collapse
- #create_tracking_data(carrier, tracking_number) ⇒ Object
-
#initialize(merchant_item_id) ⇒ ItemInfo
constructor
A new instance of ItemInfo.
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_id ⇒ Object (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_arr ⇒ Object (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 |