pinxs v2.0.0 PINXS.Transfers.Transfer View Source

Proived functions for creating and working with transfers

Link to this section Summary

Functions

Create a transfer

Gets a transfer

Gets a paginated list of transfers

Gets a specific pages of transfers

Retrieve transfers based on search criteria

Link to this section Types

Link to this type t() View Source
t() :: %PINXS.Transfers.Transfer{
  amount: integer(),
  bank_account: nil | PINXS.BankAccounts.BankAccount,
  created_at: nil | String.t(),
  currency: nil | String.t(),
  description: nil | String.t(),
  paid_at: nil | String.t(),
  recipient: String.t(),
  reference: nil | String.t(),
  status: nil | String.t(),
  token: nil | String.t(),
  total_credits: nil | integer(),
  total_debits: nil | integer()
}

Link to this section Functions

Create a transfer

Link to this function get(transfer_token, config) View Source
get(String.t(), PINXS.t()) ::
  {:ok, PINXS.Transfers.Transfer.t()} | {:error, PINXS.Error.t()}

Gets a transfer

Link to this function get_all(config) View Source
get_all(PINXS.t()) ::
  {:ok, [PINXS.Transfers.Transfer.t()]} | {:error, PINXS.Error.t()}

Gets a paginated list of transfers

Link to this function get_all(page, config) View Source
get_all(non_neg_integer(), PINXS.t()) ::
  {:ok, [PINXS.Transfers.Transfer.t()]} | {:error, PINXS.Error.t()}

Gets a specific pages of transfers

Link to this function get_line_items(transfer_token, config) View Source
get_line_items(String.t(), PINXS.t()) ::
  {:ok, [PINXS.Transfers.Transfer.t()]} | {:error, PINXS.Error.t()}
Link to this function search(query_map, config) View Source
search(map(), PINXS.t()) ::
  {:ok, [PINXS.Transfers.Transfer.t()]} | {:error, PINXS.Error.t()}

Retrieve transfers based on search criteria

Search options

%{
  query: "",
  start_date: "YYYY/MM/DD", # 2013/01/01
  end_date: "YYYY/MM/DD", # 2013/12/25
  sort: "", # field to sort by, default `created_at`
  direction: 1 # 1 or -1
}