Class: BanksApi::Shinsei::BankAccount
- Inherits:
-
BankAccount
- Object
- BankAccount
- BanksApi::Shinsei::BankAccount
- Defined in:
- lib/banks_api/shinsei/bank_account.rb
Instance Attribute Summary collapse
-
#base_balance ⇒ Object
readonly
Returns the value of attribute base_balance.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, base_balance:, session:, **other) ⇒ BankAccount
constructor
A new instance of BankAccount.
- #transactions(from:, to:) ⇒ Object
Constructor Details
#initialize(type:, base_balance:, session:, **other) ⇒ BankAccount
Returns a new instance of BankAccount.
6 7 8 9 10 11 |
# File 'lib/banks_api/shinsei/bank_account.rb', line 6 def initialize(type:, base_balance:, session:, **other) super(other) @type = type @base_balance = Money.from_amount(base_balance, currency) @session = session end |
Instance Attribute Details
#base_balance ⇒ Object (readonly)
Returns the value of attribute base_balance.
4 5 6 |
# File 'lib/banks_api/shinsei/bank_account.rb', line 4 def base_balance @base_balance end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/banks_api/shinsei/bank_account.rb', line 4 def type @type end |
Instance Method Details
#transactions(from:, to:) ⇒ Object
13 14 15 |
# File 'lib/banks_api/shinsei/bank_account.rb', line 13 def transactions(from:, to:) session.fetch_transactions(account: self, from: from, to: to) end |