Module: Vindi::Rest::Invoice
- Included in:
- Vindi::Rest
- Defined in:
- lib/vindi/rest/invoice.rb
Overview
Methods for the invoices API
Instance Method Summary collapse
-
#create_invoice(options = {}) ⇒ Hash
Create a invoice for a merchant vindi.
-
#delete_invoice(invoice_id, options = {}) ⇒ Object
Delete a invoice from merchant vindi.
-
#invoice(invoice_id, options = {}) ⇒ Hash
Get a single invoice from a merchant.
-
#list_invoices(options = {}) ⇒ Array<Hash>
List invoice for the authenticate user.
-
#retry_invoice(invoice_id, options = {}) ⇒ Object
Retry a invoice from merchant vindi.
Instance Method Details
#create_invoice(options = {}) ⇒ Hash
Create a invoice for a merchant vindi
33 34 35 |
# File 'lib/vindi/rest/invoice.rb', line 33 def create_invoice( = {}) post('invoices', )[:invoice] end |
#delete_invoice(invoice_id, options = {}) ⇒ Object
Delete a invoice from merchant vindi
44 45 46 |
# File 'lib/vindi/rest/invoice.rb', line 44 def delete_invoice(invoice_id, = {}) delete("invoices/#{invoice_id}", )[:invoice] end |
#invoice(invoice_id, options = {}) ⇒ Hash
Get a single invoice from a merchant
22 23 24 |
# File 'lib/vindi/rest/invoice.rb', line 22 def invoice(invoice_id, = {}) get("invoices/#{invoice_id}", )[:invoice] end |
#list_invoices(options = {}) ⇒ Array<Hash>
List invoice for the authenticate user
11 12 13 |
# File 'lib/vindi/rest/invoice.rb', line 11 def list_invoices( = {}) get('invoices', )[:invoices] end |
#retry_invoice(invoice_id, options = {}) ⇒ Object
Retry a invoice from merchant vindi
55 56 57 |
# File 'lib/vindi/rest/invoice.rb', line 55 def retry_invoice(invoice_id, = {}) post("invoices/#{invoice_id}/retry", )[:invoice] end |