Class: PagSeguro::SubscriptionCanceller
- Inherits:
-
Object
- Object
- PagSeguro::SubscriptionCanceller
- Defined in:
- lib/pagseguro/subscription_canceller.rb,
lib/pagseguro/subscription_canceller/response.rb
Defined Under Namespace
Classes: Response
Constant Summary collapse
- API_VERSION =
:v2
Instance Attribute Summary collapse
-
#subscription_code ⇒ Object
The code of subscription, not the plan.
Attributes included from Extensions::Credentiable
Instance Method Summary collapse
-
#errors ⇒ Object
Set errors.
- #save ⇒ Object
Methods included from Extensions::MassAssignment
Instance Attribute Details
#subscription_code ⇒ Object
The code of subscription, not the plan
9 10 11 |
# File 'lib/pagseguro/subscription_canceller.rb', line 9 def subscription_code @subscription_code end |
Instance Method Details
#errors ⇒ Object
Set errors
12 13 14 |
# File 'lib/pagseguro/subscription_canceller.rb', line 12 def errors @errors ||= Errors.new end |
#save ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/pagseguro/subscription_canceller.rb', line 16 def save request = Request.get_with_auth_on_url("pre-approvals/cancel/#{subscription_code}", API_VERSION, credentials) Response.new(request, self).serialize self end |