pinxs v2.0.3 PINXS.Refunds.Refund View Source

Provides functions for working with refunds

Link to this section Summary

Functions

Create a refund from a given charge

Retrieves a specific refunds

Get a paginated list of refunds

Gets a specific page of refunds

Gets refunds for a specific charge

Link to this section Types

Link to this type t() View Source
t() :: %PINXS.Refunds.Refund{
  amount: integer(),
  charge: String.t(),
  created_at: String.t(),
  currency: String.t(),
  error_message: String.t(),
  status_message: String.t(),
  success: boolean(),
  token: String.t()
}

Link to this section Functions

Link to this function create(charge, amount \\ %{}, config) View Source
create(PINXS.Charges.Charge.t(), map(), PINXS.t()) ::
  {:ok, PINXS.Refunds.Refund.t()} | {:error, PINXS.Error.t()}

Create a refund from a given charge

Retrieves a specific refunds

Link to this function get_all(config) View Source
get_all(PINXS.t()) ::
  {:ok, %{items: [PINXS.Refunds.Refund.t()], count: integer()}}
  | {:error, PINXS.Error.t()}

Get a paginated list of refunds

Link to this function get_all(page, config) View Source
get_all(integer(), PINXS.t()) ::
  {:ok, %{items: [PINXS.Refunds.Refund.t()], count: integer()}}
  | {:error, PINXS.Error.t()}

Gets a specific page of refunds

Link to this function get_all_for_charge(charge, config) View Source
get_all_for_charge(PINXS.Charges.Charge.t(), PINXS.t()) ::
  {:ok, %{items: [PINXS.Refunds.Refund.t()], count: integer()}}
  | {:error, PINXS.Error.t()}

Gets refunds for a specific charge