Skip to content

Requests block

Nadia edited this page Jan 9, 2020 · 1 revision

Init client instance

client = EbanqApi::Client.new

Some examples:

Get one transfer request

id (required) - Id of the transfer request

client.requests.show(1)

Get a list of all transfer request

client.requests.list({sort: 'description'})

Create TBA request

client.requests.create_tba(account_from: 1, account_to: 2, amount: 5, user: 'John')

Create OWT request

beneficiary_bank =  EbanqApi::BeneficiaryBank.new('swift', 'name', 'address','location','country','abartn')
beneficiary_customer = EbanqApi::BeneficiaryCustomer.new('name', 'address', 'iban')
additional_info = EbanqApi::AdditionalInfo.new('information_ref')
intermediary_bank =  EbanqApi::IntermediaryBank.new('swift', 'name', 'address','location','country','abartn', 'iban')

params = {
  user: 'John',
  account_from: 1,
  beneficiary_bank: beneficiary_bank,
  beneficiary_customer: beneficiary_customer,
  additional_info: additional_info,
  is_intermediary_bank: 0,
  intermediary_bank: intermediary_bank,
  amount: 1,
  currency: 1
}

client.requests.create_owt(params)