Class: Excoin::Account::Wallet::Deposit
- Inherits:
-
Object
- Object
- Excoin::Account::Wallet::Deposit
- Defined in:
- lib/account/deposit.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#confirmations ⇒ Object
readonly
Returns the value of attribute confirmations.
-
#confirmed ⇒ Object
readonly
Returns the value of attribute confirmed.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(deposit_data) ⇒ Deposit
constructor
A new instance of Deposit.
Constructor Details
#initialize(deposit_data) ⇒ Deposit
Returns a new instance of Deposit.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/account/deposit.rb', line 5 def initialize(deposit_data) begin = Time.parse(deposit_data['timestamp']) @currency = deposit_data['currency'] @id = deposit_data['txid'] @address = deposit_data['address'] @amount = BigDecimal.new(deposit_data['amount']) @confirmations = deposit_data['confirmations'] @confirmed = deposit_data['confirmed'] rescue puts "Error in Excoin::Account::Deposit.initialize" puts deposit_data end end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def address @address end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def amount @amount end |
#confirmations ⇒ Object (readonly)
Returns the value of attribute confirmations.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def confirmations @confirmations end |
#confirmed ⇒ Object (readonly)
Returns the value of attribute confirmed.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def confirmed @confirmed end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def id @id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
2 3 4 |
# File 'lib/account/deposit.rb', line 2 def end |