Class: Cargowise::Packing
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- Cargowise::Packing
- Defined in:
- lib/cargowise/packing.rb
Overview
Extra packing detail associated with a Shipment. Not built directly, but available via the packings attribute of the Shipment model.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#line_price ⇒ Object
readonly
Returns the value of attribute line_price.
-
#pack_type ⇒ Object
readonly
Returns the value of attribute pack_type.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
-
#initialize(node) ⇒ Packing
constructor
A new instance of Packing.
Methods inherited from AbstractResult
endpoint, #inspect, register, via
Constructor Details
#initialize(node) ⇒ Packing
Returns a new instance of Packing.
13 14 15 16 17 18 19 20 21 |
# File 'lib/cargowise/packing.rb', line 13 def initialize(node) @node = node @pack_type = text_value("./PackType") @line_price = decimal_value("./LinePrice") @weight = kg_value("./Weight") @volume = cubic_value("./Volume") @description = text_value("./Description") end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/cargowise/packing.rb', line 11 def description @description end |
#line_price ⇒ Object (readonly)
Returns the value of attribute line_price.
11 12 13 |
# File 'lib/cargowise/packing.rb', line 11 def line_price @line_price end |
#pack_type ⇒ Object (readonly)
Returns the value of attribute pack_type.
11 12 13 |
# File 'lib/cargowise/packing.rb', line 11 def pack_type @pack_type end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
11 12 13 |
# File 'lib/cargowise/packing.rb', line 11 def volume @volume end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
11 12 13 |
# File 'lib/cargowise/packing.rb', line 11 def weight @weight end |