Class: Modulr::Resources::Transactions::Transaction
- Defined in:
- lib/modulr/resources/transactions/transaction.rb
Instance Attribute Summary collapse
-
#available_balance ⇒ Object
readonly
Returns the value of attribute available_balance.
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(response, attributes = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Methods inherited from Base
Constructor Details
#initialize(response, attributes = {}) ⇒ Transaction
Returns a new instance of Transaction.
21 22 23 24 25 26 |
# File 'lib/modulr/resources/transactions/transaction.rb', line 21 def initialize(response, attributes = {}) super(response, attributes) @balance = attributes[:account][:balance] @available_balance = attributes[:account][:availableBalance] end |
Instance Attribute Details
#available_balance ⇒ Object (readonly)
Returns the value of attribute available_balance.
7 8 9 |
# File 'lib/modulr/resources/transactions/transaction.rb', line 7 def available_balance @available_balance end |
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
7 8 9 |
# File 'lib/modulr/resources/transactions/transaction.rb', line 7 def balance @balance end |