class PinPays::Refunds

Constants

PATH

Public Class Methods

create(charge_token, amount = nil) click to toggle source

Create a refund Amount - amount of charge to refund (optional)

# File lib/pin_pays/refunds.rb, line 9
def create(charge_token, amount = nil)
  options = (amount.nil? ? nil : { amount: amount })
  api_response(api_post("#{PATH}/#{charge_token}/refunds", options))
end
list(charge_token) click to toggle source

List all refunds for a charge Note: does not return the usual paginated response. Instead returns only an array.

# File lib/pin_pays/refunds.rb, line 16
def list(charge_token)
  api_response(api_get("#{PATH}/#{charge_token}/refunds"))
end