Class: Temando::Item::Base
- Inherits:
-
Object
- Object
- Temando::Item::Base
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/temando/item/base.rb
Overview
A Temando::Item::Base is a physical item (or a quantity of the same item) which are to be shipped.
The Temando API refers to these as “Anythings”.
We don’t ship a Temando::Item::Base itself, but rather its subclasses, Temando::Item::GeneralGoods, Temando::Item::Freight, etc.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#height ⇒ Object
Returns the value of attribute height.
-
#length ⇒ Object
Returns the value of attribute length.
-
#packaging_optimization ⇒ Object
Returns the value of attribute packaging_optimization.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
22 23 24 25 26 |
# File 'lib/temando/item/base.rb', line 22 def initialize(attributes={}) attributes.each do |key, value| self.send("#{key}=".intern, value) end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def description @description end |
#height ⇒ Object
Returns the value of attribute height.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def height @height end |
#length ⇒ Object
Returns the value of attribute length.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def length @length end |
#packaging_optimization ⇒ Object
Returns the value of attribute packaging_optimization.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def packaging_optimization @packaging_optimization end |
#quantity ⇒ Object
Returns the value of attribute quantity.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def quantity @quantity end |
#weight ⇒ Object
Returns the value of attribute weight.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def weight @weight end |
#width ⇒ Object
Returns the value of attribute width.
17 18 19 |
# File 'lib/temando/item/base.rb', line 17 def width @width end |