Class: PagSeguro::Subscriptions
- Inherits:
-
Base
- Object
- Base
- PagSeguro::Subscriptions
show all
- Defined in:
- lib/pagseguro/subscriptions.rb
Instance Attribute Summary
Attributes inherited from Base
#api
Instance Method Summary
collapse
Methods inherited from Base
#builder, #initialize, #parameterize, #parse, #parse_body
Instance Method Details
#create(params) ⇒ Object
7
8
9
10
11
|
# File 'lib/pagseguro/subscriptions.rb', line 7
def create(params)
params = parameterize params
parse_body api.post("/pre-approvals", params)
end
|
#find_by_notification_code(code) ⇒ Object
3
4
5
|
# File 'lib/pagseguro/subscriptions.rb', line 3
def find_by_notification_code(code)
parse_body api.get("/pre-approvals/notifications/#{code}")
end
|
#update(code, params) ⇒ Object
13
14
15
16
17
|
# File 'lib/pagseguro/subscriptions.rb', line 13
def update(code, params)
params = parameterize params
api.put("/pre-approvals/#{code}/payment-method", params)
end
|