pinxs v0.1.1 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 \\ %{}) View Source
create(PINXS.Charges.Charge.t(), map()) ::
  {: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() View Source
get_all() :: {:ok, [PINXS.Refunds.Refund.t()]} | {:error, PINXS.Error.t()}

Get a paginated list of refunds

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

Gets a specific page of refunds

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

Gets refunds for a specific charge