module Simpal::Payment::Authorization
Public Class Methods
Capture
an authorized payment.
@param id [String] The ID of an authorized payment. @param params [Hash] The parameters for the capture request. @param headers [Hash] The custom headers to add to the request. @param client [Simpal::Client] The API
client to make the request with. @return [Simpal::PayPalObject] An object representing the captured payment.
# File lib/simpal/payment/authorization.rb, line 30 def self.capture(id, params = {}, headers: {}, client: nil) resource = API::Payments::Authorizations.capture(id, params, headers: headers, client: client) PayPalObject.new(resource) end
Retrieve an authorized payment.
@param id [String] The ID of an authorized payment. @param headers [Hash] The custom headers to add to the request. @param client [Simpal::Client] The API
client to make the request with. @return [Simpal::PayPalObject] An object representing the authorized payment.
# File lib/simpal/payment/authorization.rb, line 17 def self.retrieve(id, headers: {}, client: nil) resource = API::Payments::Authorizations.retrieve(id, headers: headers, client: client) PayPalObject.new(resource) end
Void an authorized payment.
@param id [String] The ID of an authorized payment. @param headers [Hash] The custom headers to add to the request. @param client [Simpal::Client] The API
client to make the request with. @return [Boolean] `true` if the authorization was voided, else an exception is raised.
# File lib/simpal/payment/authorization.rb, line 55 def self.void(id, headers: {}, client: nil) API::Payments::Authorizations.void(id, headers: headers, client: client) true end