Class: Tazapay::Refund
Overview
Refund API
Instance Method Summary collapse
- #request(txn_no:, amount: nil, callback_url: nil, remarks: nil, documents: nil) ⇒ Object
- #status(txn_no) ⇒ Object
Methods inherited from Client
#handle_error, #interpret_response, #send_request
Instance Method Details
#request(txn_no:, amount: nil, callback_url: nil, remarks: nil, documents: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/tazapay/refund.rb', line 9 def request(txn_no:, amount: nil, callback_url: nil, remarks: nil, documents: nil) path = "/v1/payment/refund/request" data = { txn_no: txn_no, amount: amount, remarks: remarks, callback_url: callback_url, documents: documents } send_request(method: :post, path: path, body: data) end |
#status(txn_no) ⇒ Object
21 22 23 24 |
# File 'lib/tazapay/refund.rb', line 21 def status(txn_no) path = "/v1/payment/refund/status?txn_no=#{txn_no}" send_request(method: :get, path: path) end |