Class: Coinone::Order::TradeResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/coinone/order/trade_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TradeResponse

Returns a new instance of TradeResponse.



11
12
13
14
15
16
17
18
19
# File 'lib/coinone/order/trade_response.rb', line 11

def initialize(options={})

  @result = options[:result] || nil
  @order_id= nil

  update_response(options)


end

Instance Attribute Details

#order_idObject (readonly)

Returns the value of attribute order_id.



9
10
11
# File 'lib/coinone/order/trade_response.rb', line 9

def order_id
  @order_id
end

#resultObject (readonly)

Returns the value of attribute result.



8
9
10
# File 'lib/coinone/order/trade_response.rb', line 8

def result
  @result
end

Instance Method Details

#update_response(params = {}) ⇒ Object



21
22
23
24
25
26
# File 'lib/coinone/order/trade_response.rb', line 21

def update_response(params={})

  @result = params[:result] if params.has_key? :result
  @order_id = params[:orderId] if params.has_key? :orderId

end