Class: Chartmogul::V1::Import::Plans

Inherits:
Base
  • Object
show all
Defined in:
lib/chartmogul/v1/import/plans.rb

Constant Summary collapse

BASE_URI =
"#{BASE_URI}/import/plans"

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Instance Method Details

#create(options = {}) ⇒ Object

Public: Import a Plan.

See: dev.chartmogul.com/docs/import-plan

options - The Hash options used to create a Plan (default: {}).

Returns the instance of Chartmogul::V1::Request.



13
14
15
16
17
18
19
# File 'lib/chartmogul/v1/import/plans.rb', line 13

def create(options = {})
  Chartmogul::V1::Request.new(BASE_URI,
    body:    options,
    method:  :post,
    userpwd: client.userpwd,
  )
end

#listObject

Public: Get list Plans.

See: dev.chartmogul.com/docs/list-all-imported-plans

Returns the instance of Chartmogul::V1::Request.



26
27
28
# File 'lib/chartmogul/v1/import/plans.rb', line 26

def list
  Chartmogul::V1::Request.new BASE_URI, userpwd: client.userpwd
end