Class: FriendlyShipping::Services::ShipEngineLTL::ItemOptions Deprecated

Inherits:
ItemOptions
  • Object
show all
Defined in:
lib/friendly_shipping/services/ship_engine_ltl/item_options.rb

Overview

Deprecated.

Please use PackageOptions instead.

Item options for rate quotes.

Instance Attribute Summary collapse

Attributes inherited from ItemOptions

#item_id

Instance Method Summary collapse

Constructor Details

#initialize(packaging_code: nil, freight_class: nil, nmfc_code: nil, stackable: true, hazardous_materials: false, **kwargs) ⇒ ItemOptions

Returns a new instance of ItemOptions.

Parameters:

  • packaging_code (String) (defaults to: nil)

    the packaging code

  • freight_class (String) (defaults to: nil)

    the freight class

  • nmfc_code (String) (defaults to: nil)

    the NMFC code

  • stackable (Boolean) (defaults to: true)

    whether the item is stackable

  • hazardous_materials (Boolean) (defaults to: false)

    whether the item contains hazardous materials

  • kwargs (Hash)

Options Hash (**kwargs):

  • :item_id (String)

    the ID for the item that belongs to these options



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 31

def initialize(
  packaging_code: nil,
  freight_class: nil,
  nmfc_code: nil,
  stackable: true,
  hazardous_materials: false,
  **kwargs
)
  warn "[DEPRECATION] `ItemOptions` is deprecated.  Please use `PackageOptions` instead."
  @packaging_code = packaging_code
  @freight_class = freight_class
  @nmfc_code = nmfc_code
  @stackable = stackable
  @hazardous_materials = hazardous_materials
  super(**kwargs)
end

Instance Attribute Details

#freight_classString (readonly)

Returns the freight class.

Returns:

  • (String)

    the freight class



13
14
15
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 13

def freight_class
  @freight_class
end

#hazardous_materialsBoolean (readonly)

Returns whether the item contains hazardous materials.

Returns:

  • (Boolean)

    whether the item contains hazardous materials



22
23
24
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 22

def hazardous_materials
  @hazardous_materials
end

#nmfc_codeString (readonly)

Returns the NMFC code.

Returns:

  • (String)

    the NMFC code



16
17
18
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 16

def nmfc_code
  @nmfc_code
end

#packaging_codeString (readonly)

Returns the packaging code.

Returns:

  • (String)

    the packaging code



10
11
12
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 10

def packaging_code
  @packaging_code
end

#stackableBoolean (readonly)

Returns whether the item is stackable.

Returns:

  • (Boolean)

    whether the item is stackable



19
20
21
# File 'lib/friendly_shipping/services/ship_engine_ltl/item_options.rb', line 19

def stackable
  @stackable
end