class Coinone::Transaction
Attributes
auth_number_response[R]
coin_history[R]
connection[R]
krw_history[R]
send_coin_response[R]
Public Class Methods
new(options={}, connection=nil)
click to toggle source
# File lib/coinone/transaction.rb, line 13 def initialize(options={}, connection=nil) @connection = connection || Connection.factory(options) @auth_number_response = AuthNumberResponse.new() @coin_history = CoinHistory.new() @krw_history = KrwHistory.new() @send_coin_response = SendCoinResponse.new() end
Public Instance Methods
get_auth_number(options={})
click to toggle source
# File lib/coinone/transaction.rb, line 24 def get_auth_number(options={}) response = @connection.post( "/v2/transaction/auth_number/", options) @auth_number_response.update_response(response) @auth_number_response end
get_coin_history(options={})
click to toggle source
# File lib/coinone/transaction.rb, line 32 def get_coin_history(options={}) response = @connection.post("/v2/transaction/history/", options) @coin_history.update_histories(response) @coin_history end
get_krw_history(options={})
click to toggle source
# File lib/coinone/transaction.rb, line 41 def get_krw_history(options={}) response = @connection.post("/v2/transaction/krw/history/", options) @krw_history.update_histories(response) @krw_history end
send_coin(options={})
click to toggle source
# File lib/coinone/transaction.rb, line 50 def send_coin(options={}) response = @connection.post("/v2/transaction/coin/", options) #response = {txid: "Txid"} @send_coin_response.update_response(response.merge({ currency: options[:currency]})) @send_coin_response end