Module: Simpal::Payment::Capture

Defined in:
lib/simpal/payment/capture.rb

Overview

Class Method Summary collapse

Class Method Details

.refund(id, params = {}, headers: {}, client: nil) ⇒ Simpal::PayPalObject

Refund a captured payment.

Parameters:

  • id (String)

    The ID of a captured payment.

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

    The parameters for the refund request.

  • 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:



30
31
32
33
# File 'lib/simpal/payment/capture.rb', line 30

def self.refund(id, params = {}, headers: {}, client: nil)
  resource = API::Payments::Captures.refund(id, params, headers: headers, client: client)
  PayPalObject.new(resource)
end

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

Retrieve an captured payment.

Parameters:

  • id (String)

    The ID of a captured 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:



17
18
19
20
# File 'lib/simpal/payment/capture.rb', line 17

def self.retrieve(id, headers: {}, client: nil)
  resource = API::Payments::Captures.retrieve(id, headers: headers, client: client)
  PayPalObject.new(resource)
end