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.
1222 1223 1224 1225 |
# File 'lib/google4r/checkout/shared.rb', line 1222 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)
1217 1218 1219 |
# File 'lib/google4r/checkout/shared.rb', line 1217 def merchant_item_id @merchant_item_id end |
#tracking_data_arr ⇒ Object (readonly)
An array of tracking data for this item
1220 1221 1222 |
# File 'lib/google4r/checkout/shared.rb', line 1220 def tracking_data_arr @tracking_data_arr end |
Instance Method Details
#create_tracking_data(carrier, tracking_number) ⇒ Object
1227 1228 1229 1230 1231 |
# File 'lib/google4r/checkout/shared.rb', line 1227 def create_tracking_data(carrier, tracking_number) tracking_data = TrackingData.new(carrier, tracking_number) @tracking_data_arr << tracking_data return tracking_data end |