Sha256: 4168c0c964de2abda3634bead161d06f1d15d07316da63c0b3a6d43623d422cc
Contents?: true
Size: 826 Bytes
Versions: 15
Compression:
Stored size: 826 Bytes
Contents
require 'active_support/concern' module StarkitBanking module BankAccount extend ActiveSupport::Concern include ApiStepConcern def balance(opts = {}) @password = opts[:api_password] StarkitBanking::API::Factory.get_client(self, 'GetBalance').exec(self) end def transactions(opts = {}) @password = opts[:api_password] StarkitBanking::API::Factory.get_client(self, 'GetMiniStatement').exec(self) end def credentials c = Finance::ApiBankingCred.find_by(environment: self.environment, bank_name: self.bank_name) raise ApiFault.new(OpenStruct.new(code: 'sb:412', subCode: nil, reasonText: "Api Banking Credentials Not Available For #{self.bank_name}, #{self.environment}")) if c.nil? c.password = @password unless @password.nil? c end end end
Version data entries
15 entries across 15 versions & 1 rubygems