Module: PaypalAPI::CapturedPayments::APIs

Included in:
PaypalAPI::CapturedPayments, PaypalAPI::CapturedPayments
Defined in:
lib/paypal-api/api_collections/captured_payments.rb

Overview

Common methods for PaypalAPI::CapturedPayments class and client.captured_payments instance

Instance Method Summary collapse

Instance Method Details

#refund(capture_id, query: nil, body: nil, headers: nil) ⇒ Response

Refund captured payment

Parameters:

  • capture_id (String)

    Capture ID

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:

See Also:



40
41
42
# File 'lib/paypal-api/api_collections/captured_payments.rb', line 40

def refund(capture_id, query: nil, body: nil, headers: nil)
  client.post("/v2/payments/captures/#{encode(capture_id)}/refund", query: query, body: body, headers: headers)
end

#show(capture_id, query: nil, body: nil, headers: nil) ⇒ Response

Show captured payment details

Parameters:

  • capture_id (String)

    Capture ID

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:

See Also:



28
29
30
# File 'lib/paypal-api/api_collections/captured_payments.rb', line 28

def show(capture_id, query: nil, body: nil, headers: nil)
  client.get("/v2/payments/captures/#{encode(capture_id)}", query: query, body: body, headers: headers)
end