Class: Temando::Item::Base

Inherits:
Object
  • Object
show all
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

GeneralGoods

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def description
  @description
end

#heightObject

Returns the value of attribute height.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def height
  @height
end

#lengthObject

Returns the value of attribute length.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def length
  @length
end

#packaging_optimizationObject

Returns the value of attribute packaging_optimization.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def packaging_optimization
  @packaging_optimization
end

#quantityObject

Returns the value of attribute quantity.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def quantity
  @quantity
end

#weightObject

Returns the value of attribute weight.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def weight
  @weight
end

#widthObject

Returns the value of attribute width.



17
18
19
# File 'lib/temando/item/base.rb', line 17

def width
  @width
end