Class: PagSeguro::SubscriptionChangePayment::Response
- Inherits:
-
Object
- Object
- PagSeguro::SubscriptionChangePayment::Response
- Defined in:
- lib/pagseguro/subscription_change_payment/response.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, object) ⇒ Response
constructor
A new instance of Response.
- #serialize ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(response, object) ⇒ Response
Returns a new instance of Response.
8 9 10 11 |
# File 'lib/pagseguro/subscription_change_payment/response.rb', line 8 def initialize(response, object) @response = response @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/pagseguro/subscription_change_payment/response.rb', line 6 def object @object end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/pagseguro/subscription_change_payment/response.rb', line 5 def response @response end |
Instance Method Details
#serialize ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/pagseguro/subscription_change_payment/response.rb', line 13 def serialize unless success? object.errors.add response end object end |
#success? ⇒ Boolean
21 22 23 |
# File 'lib/pagseguro/subscription_change_payment/response.rb', line 21 def success? response.success? && response.xml? end |