Class: MtGox::Order
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#date ⇒ Object
Returns the value of attribute date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#item ⇒ Object
Returns the value of attribute item.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Offer
#amount, #client, #price, #timestamp
Instance Method Summary collapse
-
#initialize(order = {}) ⇒ Order
constructor
A new instance of Order.
Constructor Details
#initialize(order = {}) ⇒ Order
Returns a new instance of Order.
8 9 10 11 12 13 14 15 16 |
# File 'lib/mtgox/order.rb', line 8 def initialize(order={}) self.id = order['oid'] self.date = Time.at(order['date'].to_i) self.amount = BigDecimal(order['amount']['value']) self.price = BigDecimal(order['price']['value']) self.item = order['item'] self.status = order['status'] self.currency = order['currency'] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/mtgox/order.rb', line 6 def currency @currency end |
#date ⇒ Object
Returns the value of attribute date.
6 7 8 |
# File 'lib/mtgox/order.rb', line 6 def date @date end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/mtgox/order.rb', line 6 def id @id end |
#item ⇒ Object
Returns the value of attribute item.
6 7 8 |
# File 'lib/mtgox/order.rb', line 6 def item @item end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/mtgox/order.rb', line 6 def status @status end |