Class: PagSeguro::ManualSubscriptionCharger
- Inherits:
-
Object
- Object
- PagSeguro::ManualSubscriptionCharger
- Defined in:
- lib/pagseguro/manual_subscription_charger.rb,
lib/pagseguro/manual_subscription_charger/response.rb,
lib/pagseguro/manual_subscription_charger/request_serializer.rb,
lib/pagseguro/manual_subscription_charger/response_serializer.rb
Defined Under Namespace
Classes: RequestSerializer, Response, ResponseSerializer
Constant Summary collapse
- API_VERSION =
:v2
Instance Attribute Summary collapse
-
#items ⇒ Object
Set items.
-
#reference ⇒ Object
Set reference.
-
#subscription_code ⇒ Object
Set subscription code of a manual subscription.
-
#transaction_code ⇒ Object
Set transaction code, it is within the response.
Attributes included from Extensions::Credentiable
Instance Method Summary collapse
- #create ⇒ Object
-
#errors ⇒ Object
Set errors.
-
#update_attributes(attrs) ⇒ Object
Update all attributes.
Methods included from Extensions::MassAssignment
Methods included from Extensions::EnsureType
Instance Attribute Details
#items ⇒ Object
Set items
19 20 21 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 19 def items @items end |
#reference ⇒ Object
Set reference
10 11 12 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 10 def reference @reference end |
#subscription_code ⇒ Object
Set subscription code of a manual subscription
13 14 15 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 13 def subscription_code @subscription_code end |
#transaction_code ⇒ Object
Set transaction code, it is within the response
16 17 18 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 16 def transaction_code @transaction_code end |
Instance Method Details
#create ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 37 def create request = Request.post_xml('pre-approvals/payment', API_VERSION, credentials, xml_params) Response.new(request, self).serialize self end |
#errors ⇒ Object
Set errors
22 23 24 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 22 def errors @errors ||= Errors.new end |
#update_attributes(attrs) ⇒ Object
Update all attributes
33 34 35 |
# File 'lib/pagseguro/manual_subscription_charger.rb', line 33 def update_attributes(attrs) attrs.each { |name, value| send("#{name}=", value) } end |