Class: Komoju::Invoices

Inherits:
Object
  • Object
show all
Defined in:
lib/komoju/client.rb

Overview

Subscription Invoice

Instance Method Summary collapse

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

Parameters:

  • body:

    the object to pass as the request payload



361
362
363
# File 'lib/komoju/client.rb', line 361

def create(body)
  @client.invoices.create(body)
end

#list(collection_options = {}) ⇒ Object

List invoices

Parameters:

  • collection_options:

    additional collection options to pass with the request



347
348
349
# File 'lib/komoju/client.rb', line 347

def list(collection_options = {})
  @client.invoices.list(collection_options)
end

#pay(invoices_id, body) ⇒ Object

Pay an invoice

Parameters:

  • invoices_id:

    A unique identifier for the invoice.

  • body:

    the object to pass as the request payload



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

Parameters:

  • body:

    the object to pass as the request payload



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

Parameters:

  • invoices_id:

    A unique identifier for the invoice.



354
355
356
# File 'lib/komoju/client.rb', line 354

def show(invoices_id)
  @client.invoices.show(invoices_id)
end