Module: NeonApi::SendTransfer

Defined in:
lib/neon_api/methods/send_transfer.rb

Constant Summary collapse

URL =
'V1/Transfer/SendTransfer'

Class Method Summary collapse

Class Method Details

.create(bank_account_id, finality_id, description, credit_to_bank, account_type, branch, bank_account_number, name, document, value, scheduled_to) ⇒ Object



4
5
6
# File 'lib/neon_api/methods/send_transfer.rb', line 4

def self.create(, finality_id, description, credit_to_bank, , branch, , name, document, value, scheduled_to)
  NeonApi.client.send_request(payload(, finality_id, description, credit_to_bank, , branch, , name, document, value, scheduled_to), URL)
end

.payload(bank_account_id, finality_id, description, credit_to_bank, account_type = "CC", branch = "1", bank_account_number, name, document, value, scheduled_to) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/neon_api/methods/send_transfer.rb', line 8

def self.payload(, finality_id, description, credit_to_bank,  = "CC", branch = "1", , name, document, value, scheduled_to)
  {
      "BankAccountId": ,
      "FinalityId": finality_id,
      "Description": description,
      "CreditTo": {
          "CodBank": credit_to_bank,
          "AccountyType": ,
          "Branch": branch,
          "BankAccountNumber": ,
          "Name": name,
          "Document": document,
          "Value": value,
          "SchedulingDate": scheduled_to
      },
      "ClientID": NeonApi.client.client_id
  }.to_json
end