Class: FriendlyShipping::Services::ShipEngine::LabelItemOptions

Inherits:
ItemOptions
  • Object
show all
Defined in:
lib/friendly_shipping/services/ship_engine/label_item_options.rb

Overview

Item options for generating shipping labels.

Instance Attribute Summary collapse

Attributes inherited from ItemOptions

#item_id

Instance Method Summary collapse

Constructor Details

#initialize(commodity_code: nil, country_of_origin: nil, **kwargs) ⇒ LabelItemOptions

Returns a new instance of LabelItemOptions.

Options Hash (**kwargs):

  • :item_id (String)

    the ID for the item that belongs to these options



18
19
20
21
22
23
24
25
26
# File 'lib/friendly_shipping/services/ship_engine/label_item_options.rb', line 18

def initialize(
  commodity_code: nil,
  country_of_origin: nil,
  **kwargs
)
  @commodity_code = commodity_code
  @country_of_origin = country_of_origin
  super(**kwargs)
end

Instance Attribute Details

#commodity_codeString (readonly)



9
10
11
# File 'lib/friendly_shipping/services/ship_engine/label_item_options.rb', line 9

def commodity_code
  @commodity_code
end

#country_of_originString (readonly)



12
13
14
# File 'lib/friendly_shipping/services/ship_engine/label_item_options.rb', line 12

def country_of_origin
  @country_of_origin
end