Method: ChinaShop::Order#initialize
- Defined in:
- lib/chinashop/order.rb
#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 |