Module: StarkitBanking::ApiClient
- Included in:
- YBL::Account::GetBalance, YBL::Account::GetMiniStatement, YBL::Beneficiary::IMT::Add, YBL::Beneficiary::IMT::Delete, YBL::Payment::ByFT2, YBL::Payment::ByIMT, YBL::Payment::GetStatus
- Defined in:
- lib/starkit_banking/api/client.rb
Instance Method Summary collapse
Instance Method Details
#exec(model) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/starkit_banking/api/client.rb', line 10 def exec(model) env = Environment.build(credentials(model)) req = request(model) res = invoke(env, req) if res.instance_of?ApiBanking::Fault # for certain API calls, certain faults are expected, for example, when a retry is made it is not an error raise ApiFault.new(res) else response(res) end end |
#initialize(step_name = nil) ⇒ Object
6 7 8 |
# File 'lib/starkit_banking/api/client.rb', line 6 def initialize(step_name = nil) @step_name = step_name end |