Class: Coinone::Transaction::CoinHistory::History
- Inherits:
-
Object
- Object
- Coinone::Transaction::CoinHistory::History
- Defined in:
- lib/coinone/transaction/coin_history/history.rb
Instance Attribute Summary collapse
-
#confirmations ⇒ Object
readonly
Returns the value of attribute confirmations.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#txid ⇒ Object
readonly
Returns the value of attribute txid.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ History
constructor
A new instance of History.
- #update_history(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ History
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 12 def initialize(={}) @txid = nil @type = nil @from = nil @to = nil @confirmations = nil @quantity = nil = nil update_history() end |
Instance Attribute Details
#confirmations ⇒ Object (readonly)
Returns the value of attribute confirmations.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def confirmations @confirmations end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def from @from end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def quantity @quantity end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def to @to end |
#txid ⇒ Object (readonly)
Returns the value of attribute txid.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def txid @txid end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 10 def type @type end |
Instance Method Details
#update_history(params = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/coinone/transaction/coin_history/history.rb', line 26 def update_history(params={}) @txid = params[:txid] if params.has_key? :txid @type = params[:type] if params.has_key? :type @from = params[:from] if params.has_key? :from @to = params[:to] if params.has_key? :to @confirmations = params[:confirmations].to_i if params.has_key? :confirmations @quantity = params[:quantity].to_f if params.has_key? :quantity = params[:timestamp].to_i if params.has_key? :timestamp end |