Module: NeonApi::GeneratePaymentSlipToPayer
- Defined in:
- lib/neon_api/methods/generate_payment_slip_to_payer.rb
Constant Summary collapse
- URL =
'V1/PaymentSlip/GeneratePaymentSlipToPayer'
Class Method Summary collapse
- .create(bank_acc_id, name, cpf, email, address, number, complement, zipcode, city, state, country) ⇒ Object
- .payload(bank_account, payer_id, cpf, due_date, value, instructions = []) ⇒ Object
Class Method Details
.create(bank_acc_id, name, cpf, email, address, number, complement, zipcode, city, state, country) ⇒ Object
4 5 6 |
# File 'lib/neon_api/methods/generate_payment_slip_to_payer.rb', line 4 def self.create(bank_acc_id, name, cpf, email, address, number, complement, zipcode, city, state, country) NeonApi.client.send_request(payload(bank_acc_id, name, cpf, email, address, number, complement, zipcode, city, state, country), URL) end |
.payload(bank_account, payer_id, cpf, due_date, value, instructions = []) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/neon_api/methods/generate_payment_slip_to_payer.rb', line 8 def self.payload(bank_account, payer_id, cpf, due_date, value, instructions = []) { "ClientId": NeonApi.client.client_id, "BankAccountId": bank_account, "PayerId": payer_id, "CPF": cpf, "DueDate": due_date, "Value": value, "Instructions": instructions }.to_json end |