Module: PaypalAPI::AuthorizedPayments::APIs

Included in:
PaypalAPI::AuthorizedPayments, PaypalAPI::AuthorizedPayments
Defined in:
lib/paypal-api/api_collections/authorized_payments.rb

Overview

Common methods for PayplaAPI::AuthorizedPayments class and client.authorized_payments instance

Instance Method Summary collapse

Instance Method Details

#capture(authorization_id, query: nil, body: nil, headers: nil) ⇒ Response

Capture authorized payment

Parameters:

  • authorization_id (String)

    Authorization 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/authorized_payments.rb', line 40

def capture(authorization_id, query: nil, body: nil, headers: nil)
  client.post("/v2/payments/authorizations/#{encode(authorization_id)}/capture", query: query, body: body, headers: headers)
end

#reauthorize(authorization_id, query: nil, body: nil, headers: nil) ⇒ Response

Reauthorize authorized payment

Parameters:

  • authorization_id (String)

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



51
52
53
# File 'lib/paypal-api/api_collections/authorized_payments.rb', line 51

def reauthorize(authorization_id, query: nil, body: nil, headers: nil)
  client.post("/v2/payments/authorizations/#{encode(authorization_id)}/reauthorize", query: query, body: body, headers: headers)
end

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

Show details for authorized payment

Parameters:

  • authorization_id (String)

    Authorization 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/authorized_payments.rb', line 28

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

#void(authorization_id, query: nil, body: nil, headers: nil) ⇒ Response

Void authorized payment

Parameters:

  • authorization_id (String)

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



62
63
64
# File 'lib/paypal-api/api_collections/authorized_payments.rb', line 62

def void(authorization_id, query: nil, body: nil, headers: nil)
  client.post("/v2/payments/authorizations/#{encode(authorization_id)}/void", query: query, body: body, headers: headers)
end