Class: Komoju::Invoices
- Inherits:
-
Object
- Object
- Komoju::Invoices
- Defined in:
- lib/komoju/client.rb
Overview
Subscription Invoice
Instance Method Summary collapse
-
#create(body) ⇒ Object
Create an invoice.
-
#initialize(client) ⇒ Invoices
constructor
A new instance of Invoices.
-
#list(collection_options = {}) ⇒ Object
List invoices.
-
#pay(invoices_id, body) ⇒ Object
Pay an invoice.
-
#preview(body) ⇒ Object
Preview an upcoming invoice.
-
#show(invoices_id) ⇒ Object
Show an invoice.
Constructor Details
#initialize(client) ⇒ Invoices
Returns a new instance of Invoices.
340 341 342 |
# File 'lib/komoju/client.rb', line 340 def initialize(client) @client = client end |
Instance Method Details
#create(body) ⇒ Object
Create an invoice
361 362 363 |
# File 'lib/komoju/client.rb', line 361 def create(body) @client.invoices.create(body) end |
#list(collection_options = {}) ⇒ Object
List invoices
347 348 349 |
# File 'lib/komoju/client.rb', line 347 def list( = {}) @client.invoices.list() end |
#pay(invoices_id, body) ⇒ Object
Pay an invoice
376 377 378 |
# File 'lib/komoju/client.rb', line 376 def pay(invoices_id, body) @client.invoices.pay(invoices_id, body) end |
#preview(body) ⇒ Object
Preview an upcoming invoice
368 369 370 |
# File 'lib/komoju/client.rb', line 368 def preview(body) @client.invoices.preview(body) end |
#show(invoices_id) ⇒ Object
Show an invoice
354 355 356 |
# File 'lib/komoju/client.rb', line 354 def show(invoices_id) @client.invoices.show(invoices_id) end |