Class: Fakturoid::Api::InvoicePayment
- Inherits:
-
Object
- Object
- Fakturoid::Api::InvoicePayment
- Includes:
- Base
- Defined in:
- lib/fakturoid/api/invoice_payment.rb
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #create(invoice_id, payload = {}) ⇒ Object
- #create_tax_document(invoice_id, id) ⇒ Object
- #delete(invoice_id, id) ⇒ Object
Methods included from Base
Instance Method Details
#create(invoice_id, payload = {}) ⇒ Object
8 9 10 11 |
# File 'lib/fakturoid/api/invoice_payment.rb', line 8 def create(invoice_id, payload = {}) Utils.validate_numerical_id(invoice_id) perform_request(HTTP_POST, "invoices/#{invoice_id}/payments.json", payload: payload) end |
#create_tax_document(invoice_id, id) ⇒ Object
13 14 15 16 17 |
# File 'lib/fakturoid/api/invoice_payment.rb', line 13 def create_tax_document(invoice_id, id) Utils.validate_numerical_id(invoice_id) Utils.validate_numerical_id(id) perform_request(HTTP_POST, "invoices/#{invoice_id}/payments/#{id}/create_tax_document.json") end |
#delete(invoice_id, id) ⇒ Object
19 20 21 22 23 |
# File 'lib/fakturoid/api/invoice_payment.rb', line 19 def delete(invoice_id, id) Utils.validate_numerical_id(invoice_id) Utils.validate_numerical_id(id) perform_request(HTTP_DELETE, "invoices/#{invoice_id}/payments/#{id}.json") end |