Class: Vertpig::Deposit
- Inherits:
-
Object
- Object
- Vertpig::Deposit
- Includes:
- Helpers
- Defined in:
- lib/vertpig/deposit.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#confirmations ⇒ Object
readonly
Returns the value of attribute confirmations.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#executed_at ⇒ Object
readonly
Returns the value of attribute executed_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#transaction_id ⇒ Object
readonly
Returns the value of attribute transaction_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Deposit
constructor
A new instance of Deposit.
Methods included from Helpers
Constructor Details
#initialize(attrs = {}) ⇒ Deposit
Returns a new instance of Deposit.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vertpig/deposit.rb', line 8 def initialize(attrs = {}) @id = attrs['Id'] @transaction_id = attrs['TxId'] @address = attrs['CryptoAddress'] @quantity = attrs['Amount'] @currency = attrs['Currency'] @confirmations = attrs['Confirmations'] @executed_at = (attrs['LastUpdated']) @raw = attrs end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def address @address end |
#confirmations ⇒ Object (readonly)
Returns the value of attribute confirmations.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def confirmations @confirmations end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def currency @currency end |
#executed_at ⇒ Object (readonly)
Returns the value of attribute executed_at.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def executed_at @executed_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def id @id end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def quantity @quantity end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/vertpig/deposit.rb', line 6 def raw @raw end |
#transaction_id ⇒ Object (readonly)
Returns the value of attribute transaction_id.
5 6 7 |
# File 'lib/vertpig/deposit.rb', line 5 def transaction_id @transaction_id end |
Class Method Details
.all ⇒ Object
19 20 21 |
# File 'lib/vertpig/deposit.rb', line 19 def self.all client.get('account/getdeposithistory').map{|data| new(data) } end |