Module: NeonApi::SendPayment
- Defined in:
- lib/neon_api/methods/send_payment.rb
Constant Summary collapse
- URL =
'V1/PaymentSlip/SendPayment'
Class Method Summary collapse
- .create(description, bar_code, due_date, value, discount, tx) ⇒ Object
- .payload(description, bar_code, due_date, value, discount, tx) ⇒ Object
Class Method Details
.create(description, bar_code, due_date, value, discount, tx) ⇒ Object
4 5 6 |
# File 'lib/neon_api/methods/send_payment.rb', line 4 def self.create(description, , due_date, value, discount, tx) NeonApi.client.send_request(payload(description, , due_date, value, discount, tx), URL) end |
.payload(description, bar_code, due_date, value, discount, tx) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/neon_api/methods/send_payment.rb', line 8 def self.payload(description, , due_date, value, discount, tx) { "ClientId": NeonApi.client.client_id, "Payments": [ { "description": description, "BarCodeNumber": , "DueDate": due_date, "Assignor": "Cedente", "Value": value, "Discount": discount, "TaxValue": tx } ] }.to_json end |