Class: GmxCheckout::Subscriptions
- Inherits:
-
Base
- Object
- Base
- GmxCheckout::Subscriptions
show all
- Defined in:
- lib/gmxcheckout/subscriptions.rb
Instance Attribute Summary
Attributes inherited from Base
#api
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #prepare!, #process_body, #process_transaction
Instance Method Details
#cancel(code) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/gmxcheckout/subscriptions.rb', line 13
def cancel(code)
response = api.post '/txn/cancelaRecorrencia',
'hashEmpresa' => api.api_key,
'recorrencia.idRecorrencia' => code
process_body response
end
|
#create(hash) ⇒ Object
3
4
5
6
|
# File 'lib/gmxcheckout/subscriptions.rb', line 3
def create(hash)
response = api.post '/txn/post', create_params(hash)
process_transaction response
end
|
#update(hash) ⇒ Object
8
9
10
11
|
# File 'lib/gmxcheckout/subscriptions.rb', line 8
def update(hash)
response = api.post '/txn/post', update_params(hash)
process_transaction response
end
|