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