Class: Chartmogul::V1::Import::Subscriptions
- Defined in:
- lib/chartmogul/v1/import/subscriptions.rb
Constant Summary collapse
- BASE_URI =
"#{BASE_URI}/import"
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#cancel(uuid, cancelled_at) ⇒ Object
Public: Cancel Imported Customer’s Subscription.
-
#list(uuid) ⇒ Object
Public: List Customer’s Subscriptions.
Instance Method Details
#cancel(uuid, cancelled_at) ⇒ Object
Public: Cancel Imported Customer’s Subscription.
See: dev.chartmogul.com/docs/cancel-a-customers-subscription
uuid - The String ChartMogul UUID of the subscription that needs to be cancelled. cancelled_at - The Time at which the subscription was cancelled.
Returns the instance of Chartmogul::V1::Request.
14 15 16 17 18 19 20 |
# File 'lib/chartmogul/v1/import/subscriptions.rb', line 14 def cancel(uuid, cancelled_at) Chartmogul::V1::Request.new("#{BASE_URI}/subscriptions/#{uuid}", body: { cancelled_at: cancelled_at.iso8601 }, method: :put, userpwd: client.userpwd, ) end |
#list(uuid) ⇒ Object
Public: List Customer’s Subscriptions.
See: dev.chartmogul.com/docs/list-a-customers-subscriptions
uuid - The String ChartMogul UUID of the Customer whose subscriptions are required. Specified as part of the URL.
Returns the instance of Chartmogul::V1::Request.
29 30 31 |
# File 'lib/chartmogul/v1/import/subscriptions.rb', line 29 def list(uuid) Chartmogul::V1::Request.new "#{BASE_URI}/customers/#{uuid}/subscriptions", userpwd: client.userpwd end |