class PagSeguro::SubscriptionChangeStatus
Constants
- STATUSES
Now, just available ACTIVE and SUSPENDED
Attributes
code[R]
Subscription’s code that will be changed
status[R]
The status that will be set
Public Class Methods
new(code, status)
click to toggle source
# File lib/pagseguro/subscription_change_status.rb, line 18 def initialize(code, status) @code = code @status = status end
Public Instance Methods
errors()
click to toggle source
Set errors
# File lib/pagseguro/subscription_change_status.rb, line 24 def errors @errors ||= Errors.new end
save()
click to toggle source
# File lib/pagseguro/subscription_change_status.rb, line 28 def save request = Request.put_xml("pre-approvals/#{code}/status", credentials, params) Response.new(request, self).serialize self end
status_text()
click to toggle source
# File lib/pagseguro/subscription_change_status.rb, line 36 def status_text STATUSES[status] end
Private Instance Methods
after_initialize()
click to toggle source
# File lib/pagseguro/subscription_change_status.rb, line 46 def after_initialize @errors = Errors.new end
params()
click to toggle source
# File lib/pagseguro/subscription_change_status.rb, line 42 def params RequestSerializer.new(self).serialize end