Module: StarkitBanking::BankAccount

Extended by:
ActiveSupport::Concern
Defined in:
lib/starkit_banking/concerns/bank_account.rb

Instance Method Summary collapse

Instance Method Details

#balance(opts = {}) ⇒ Object



7
8
9
10
# File 'lib/starkit_banking/concerns/bank_account.rb', line 7

def balance(opts = {})
  @password = opts[:api_password]
  StarkitBanking::API::Factory.get_client(self, 'GetBalance').exec(self)
end

#credentialsObject



17
18
19
20
21
# File 'lib/starkit_banking/concerns/bank_account.rb', line 17

def credentials
  c = Finance::ApiBankingCred.find_by(environment: self.environment, bank_name: self.bank_name)
  c.password = @password unless @password.nil?
  c
end

#transactions(opts = {}) ⇒ Object



12
13
14
15
# File 'lib/starkit_banking/concerns/bank_account.rb', line 12

def transactions(opts = {})
  @password = opts[:api_password]
  StarkitBanking::API::Factory.get_client(self, 'GetMiniStatement').exec(self)
end