Class: Coinone::Order::CompleteOrders::CompleteOrder
- Inherits:
-
Object
- Object
- Coinone::Order::CompleteOrders::CompleteOrder
- Defined in:
- lib/coinone/order/complete_orders/complete_order.rb
Instance Attribute Summary collapse
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#fee_rate ⇒ Object
readonly
Returns the value of attribute fee_rate.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#qty ⇒ Object
readonly
Returns the value of attribute qty.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CompleteOrder
constructor
A new instance of CompleteOrder.
- #update_response(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ CompleteOrder
Returns a new instance of CompleteOrder.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 11 def initialize(={}) @timestamp = nil @price = nil @type = nil @qty = nil @fee_rate = nil @fee = nil @order_id = nil update_response() end |
Instance Attribute Details
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def fee @fee end |
#fee_rate ⇒ Object (readonly)
Returns the value of attribute fee_rate.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def fee_rate @fee_rate end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def order_id @order_id end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def price @price end |
#qty ⇒ Object (readonly)
Returns the value of attribute qty.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def qty @qty end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 9 def type @type end |
Instance Method Details
#update_response(params = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/coinone/order/complete_orders/complete_order.rb', line 27 def update_response(params={}) @timestamp = params[:timestamp].to_i if params.has_key? :timestamp @price = params[:price].to_i if params.has_key? :price @qty = params[:qty].to_f if params.has_key? :qty @type = params[:type] if params.has_key? :type @fee_rate = params[:feeRate].to_f if params.has_key? :feeRate @fee = params[:fee].to_f if params.has_key? :fee @order_id = params[:orderId] if params.has_key? :orderId end |