Zazu.Accounts (zazu v0.2.1)

Copy Markdown View Source

Accounts and their transactions.

Summary

Functions

Calls GET /api/accounts/:id.

Calls GET /api/accounts/:account_id/transactions/:id.

Calls GET /api/accounts.

Calls GET /api/accounts/:account_id/transactions.

Functions

get(client, id)

@spec get(Zazu.Client.t(), String.t()) ::
  {:ok, Zazu.Response.t()} | {:error, Exception.t()}

Calls GET /api/accounts/:id.

get_transaction(client, account_id, transaction_id)

@spec get_transaction(Zazu.Client.t(), String.t(), String.t()) ::
  {:ok, Zazu.Response.t()} | {:error, Exception.t()}

Calls GET /api/accounts/:account_id/transactions/:id.

list(client, opts \\ [])

@spec list(
  Zazu.Client.t(),
  keyword()
) :: {:ok, Zazu.Page.t()} | {:error, Exception.t()}

Calls GET /api/accounts.

Options

  • :status — filter by account status.
  • :currency_code — filter by currency code.
  • :limit — page size (1..100, default 100).
  • :cursor — pagination cursor.

list_transactions(client, account_id, opts \\ [])

@spec list_transactions(Zazu.Client.t(), String.t(), keyword()) ::
  {:ok, Zazu.Page.t()} | {:error, Exception.t()}

Calls GET /api/accounts/:account_id/transactions.

Options

  • :operation — filter by operation ("credit" / "debit").
  • :posted_after — ISO-8601 lower bound.
  • :posted_before — ISO-8601 upper bound.
  • :limit — page size (1..100, default 100).
  • :cursor — pagination cursor.