Class: Coinone::Public::CompleteOrders
- Inherits:
-
Object
- Object
- Coinone::Public::CompleteOrders
- Defined in:
- lib/coinone/public/complete_orders.rb,
lib/coinone/public/complete_orders/complete_order.rb
Defined Under Namespace
Classes: CompleteOrder
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#orders ⇒ Object
readonly
Returns the value of attribute orders.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ CompleteOrders
constructor
A new instance of CompleteOrders.
- #push_orders(params) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ CompleteOrders
8 9 10 11 12 13 |
# File 'lib/coinone/public/complete_orders.rb', line 8 def initialize(params={}) @orders = [] = params[:timestamp] || nil @currency= params[:currency] || nil push_orders(params[:completeOrders]) if params.has_key? :completeOrders end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/coinone/public/complete_orders.rb', line 6 def currency @currency end |
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
6 7 8 |
# File 'lib/coinone/public/complete_orders.rb', line 6 def orders @orders end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/coinone/public/complete_orders.rb', line 6 def end |
Instance Method Details
#push_orders(params) ⇒ Object
15 16 17 18 19 |
# File 'lib/coinone/public/complete_orders.rb', line 15 def push_orders(params) params.each do |order| @orders.push(CompleteOrder.new(order)) end end |