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