Class: OrderItem
- Inherits:
-
Object
- Object
- OrderItem
- Defined in:
- lib/maropost_api/custom_types/order_item.rb
Instance Attribute Summary collapse
-
#adcode ⇒ Object
Returns the value of attribute adcode.
-
#category ⇒ Object
Returns the value of attribute category.
-
#description ⇒ Object
Returns the value of attribute description.
-
#item_id ⇒ Object
Returns the value of attribute item_id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
Instance Method Summary collapse
-
#initialize(item_id, price, quantity, description, adcode, category) ⇒ OrderItem
constructor
A new instance of OrderItem.
- #to_hash ⇒ Object
Constructor Details
#initialize(item_id, price, quantity, description, adcode, category) ⇒ OrderItem
Returns a new instance of OrderItem.
5 6 7 8 9 10 11 12 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 5 def initialize(item_id, price, quantity, description, adcode, category) @item_id = item_id @price = price @quantity = quantity @description = description @adcode = adcode @category = category end |
Instance Attribute Details
#adcode ⇒ Object
Returns the value of attribute adcode.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def adcode @adcode end |
#category ⇒ Object
Returns the value of attribute category.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def category @category end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def description @description end |
#item_id ⇒ Object
Returns the value of attribute item_id.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def item_id @item_id end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
3 4 5 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 3 def quantity @quantity end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/maropost_api/custom_types/order_item.rb', line 14 def to_hash { item_id: @item_id, price: @price, quantity: @quantity, description: @description, adcode: @adcode, category: @category } end |