Module: Simpal::API::Payments::Refunds

Defined in:
lib/simpal/api/payments/refunds.rb

Overview

Class Method Summary collapse

Class Method Details

.retrieve(id, headers: {}, client: nil) ⇒ Hash

Retrieve a refunded payment.

Parameters:

  • id (String)

    The ID of a refunded payment.

  • headers (Hash) (defaults to: {})

    The custom headers to add to the request.

  • client (Simpal::Client) (defaults to: nil)

    The API client to make the request with.

Returns:

  • (Hash)

    A Hash representing the refunded payment.



18
19
20
21
22
# File 'lib/simpal/api/payments/refunds.rb', line 18

def self.retrieve(id, headers: {}, client: nil)
  client = Simpal.client_for(client)
  response = client.connection.get("/v2/payments/refunds/#{id}", headers)
  response.body
end