Class: Komoju::Plans

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

Overview

Subscription Plans

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Plans

Returns a new instance of Plans.



419
420
421
# File 'lib/komoju/client.rb', line 419

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a plan

Parameters:

  • body:

    the object to pass as the request payload



440
441
442
# File 'lib/komoju/client.rb', line 440

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

#delete(plans_name) ⇒ Object

Delete a plan

Parameters:

  • plans_name:

    Name of the plan.



447
448
449
# File 'lib/komoju/client.rb', line 447

def delete(plans_name)
  @client.plans.delete(plans_name)
end

#list(collection_options = {}) ⇒ Object

List plans

Parameters:

  • collection_options:

    additional collection options to pass with the request



426
427
428
# File 'lib/komoju/client.rb', line 426

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

#show(plans_name) ⇒ Object

Show a plan

Parameters:

  • plans_name:

    Name of the plan.



433
434
435
# File 'lib/komoju/client.rb', line 433

def show(plans_name)
  @client.plans.show(plans_name)
end