Module: Simpal::API::Payments::Captures
- Defined in:
- lib/simpal/api/payments/captures.rb
Overview
Class Method Summary collapse
-
.refund(id, params = {}, headers: {}, client: nil) ⇒ Hash
Refund a captured payment.
-
.retrieve(id, headers: {}, client: nil) ⇒ Hash
Retrieve a captured payment.
Class Method Details
.refund(id, params = {}, headers: {}, client: nil) ⇒ Hash
Refund a captured payment.
32 33 34 35 36 |
# File 'lib/simpal/api/payments/captures.rb', line 32 def self.refund(id, params = {}, headers: {}, client: nil) client = Simpal.client_for(client) response = client.connection.post("/v2/payments/captures/#{id}/refund", params, headers) response.body end |
.retrieve(id, headers: {}, client: nil) ⇒ Hash
Retrieve a captured payment.
18 19 20 21 22 |
# File 'lib/simpal/api/payments/captures.rb', line 18 def self.retrieve(id, headers: {}, client: nil) client = Simpal.client_for(client) response = client.connection.get("/v2/payments/captures/#{id}", headers) response.body end |