Class: BanksApi::Shinsei::BankAccount

Inherits:
BankAccount
  • Object
show all
Defined in:
lib/banks_api/shinsei/bank_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject (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