Class: Modulr::Resources::Transactions::Transaction

Inherits:
Base
  • Object
show all
Defined in:
lib/modulr/resources/transactions/transaction.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

map

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_balanceObject (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

#balanceObject (readonly)

Returns the value of attribute balance.



7
8
9
# File 'lib/modulr/resources/transactions/transaction.rb', line 7

def balance
  @balance
end