Class: Mercadopago::Refund
- Defined in:
- lib/mercadopago/resources/refund.rb
Overview
[Click here for more infos](www.mercadopago.com.br/developers/en/guides/manage-account/account/cancellations-and-refunds#bookmark_refunds)
Instance Method Summary collapse
- #create(payment_id, refund_data: nil, request_options: nil) ⇒ Object
- #list(payment_id, request_options: nil) ⇒ Object
Methods inherited from MPBase
#_check_headers, #_check_request_options, #_delete, #_get, #_post, #_put, #initialize
Constructor Details
This class inherits a constructor from Mercadopago::MPBase
Instance Method Details
#create(payment_id, refund_data: nil, request_options: nil) ⇒ Object
18 19 20 21 22 |
# File 'lib/mercadopago/resources/refund.rb', line 18 def create(payment_id, refund_data: nil, request_options: nil) raise TypeError, 'Param refund_data must be a Hash' unless refund_data.nil? || refund_data.is_a?(Hash) _post(uri: "/v1/payments/#{payment_id}/refunds", data: refund_data, request_options: ) end |
#list(payment_id, request_options: nil) ⇒ Object
14 15 16 |
# File 'lib/mercadopago/resources/refund.rb', line 14 def list(payment_id, request_options: nil) _get(uri: "/v1/payments/#{payment_id}/refunds", request_options: ) end |