Class: PagSeguro::Plans
- Inherits:
-
Object
- Object
- PagSeguro::Plans
- Includes:
- Restful
- Defined in:
- lib/pagseguro/plans.rb
Instance Attribute Summary
Attributes included from Restful
Instance Method Summary collapse
Methods included from Restful
Instance Method Details
#create(params) ⇒ Object
7 8 9 10 |
# File 'lib/pagseguro/plans.rb', line 7 def create(params) body = build_request(params).to_xml post("/pre-approvals/request", body, xml: :versioned) end |
#update(code, params) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/pagseguro/plans.rb', line 12 def update(code, params) params[:amount_per_payment] = to_money params[:amount_per_payment] params = parameterize params put("/pre-approvals/request/#{code}/payment", params) end |