Class: ChinaShop::Order
- Inherits:
-
Object
- Object
- ChinaShop::Order
- Defined in:
- lib/chinashop/order.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
Returns the value of attribute all.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#amount_original ⇒ Object
Returns the value of attribute amount_original.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#date ⇒ Object
Returns the value of attribute date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(order = {}) ⇒ Order
constructor
A new instance of Order.
Constructor Details
#initialize(order = {}) ⇒ Order
Returns a new instance of Order.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/chinashop/order.rb', line 5 def initialize(order = {}) self.all = order['result']['order'] self.id = order['result']['order']['id'] self.type = order['result']['order']['type'] self.price = order['result']['order']['price'] self.currency = order['result']['order']['currency'] self.amount = order['result']['order']['amount'] self.amount_original = order['result']['order']['amount_original'] self.date = order['result']['order']['date'] self.status = order['result']['order']['status'] end |
Instance Attribute Details
#all ⇒ Object
Returns the value of attribute all.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def all @all end |
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def amount @amount end |
#amount_original ⇒ Object
Returns the value of attribute amount_original.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def amount_original @amount_original end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def currency @currency end |
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def date @date end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def id @id end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def price @price end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def status @status end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/chinashop/order.rb', line 3 def type @type end |