class Coinone::Transaction::SendCoinResponse
Attributes
currency[R]
result[R]
txid[R]
Public Class Methods
new(options={})
click to toggle source
# File lib/coinone/transaction/send_coin_response.rb, line 11 def initialize(options={}) @result = options[:result] || nil @txid = nil @currency = options[:currency] || nil update_response(options) end
Public Instance Methods
transaction_url()
click to toggle source
# File lib/coinone/transaction/send_coin_response.rb, line 30 def transaction_url url = nil url = "https://blockchain.info/tx/#{txid}" if @currency == "btc" url = "https://etherscan.io/tx/#{txid}" if @currency == "eth" url = "https://gastracker.io/tx/#{txid}" if @currency == "etc" url end
update_response(params={})
click to toggle source
# File lib/coinone/transaction/send_coin_response.rb, line 22 def update_response(params={}) @result = params[:result] if params.has_key? :result @txid = params[:txid] if params.has_key? :txid @currency = params[:currency].downcase if params.has_key? :currency end