lib/moip-assinaturas/client.rb in moip-assinaturas-0.2.3 vs lib/moip-assinaturas/client.rb in moip-assinaturas-0.3.0
- old
+ new
@@ -89,9 +89,14 @@
def activate_subscription(code, opts={})
prepare_options(opts, { headers: { 'Content-Type' => 'application/json' } })
peform_action!(:put, "/subscriptions/#{code}/activate", opts, true)
end
+ def cancel_subscription(code, opts={})
+ prepare_options(opts, { headers: { 'Content-Type' => 'application/json' } })
+ peform_action!(:put, "/subscriptions/#{code}/cancel", opts, true)
+ end
+
def list_invoices(subscription_code, opts={})
prepare_options(opts, { headers: { 'Content-Type' => 'application/json' } })
peform_action!(:get, "/subscriptions/#{subscription_code}/invoices", opts)
end
\ No newline at end of file