Moov.Wallets (Moov v1.0.0)

Copy Markdown View Source

Moov's internal stored-balance ledger. Every account with the "wallet" capability gets a "default" wallet automatically; create additional "general" wallets to segment funds (e.g. one wallet per sub-program).

See https://docs.moov.io/api/sources/wallets/.

Summary

Functions

Creates an additional wallet for an account (params: %{wallet_type: "general", description: ...}).

Retrieves a wallet, including its current available_balance.

Retrieves a single balance adjustment for an account.

Lists an account's wallets.

Lists balance adjustments for an account.

Lists a wallet's transactions. Filter with opts[:query], e.g. query: [status: "completed"].

Updates a wallet's description/metadata.

Functions

create(client, account_id, params)

@spec create(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates an additional wallet for an account (params: %{wallet_type: "general", description: ...}).

get(client, account_id, wallet_id)

@spec get(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a wallet, including its current available_balance.

get_adjustment(client, account_id, adjustment_id)

@spec get_adjustment(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a single balance adjustment for an account.

get_transaction(client, account_id, wallet_id, transaction_id)

@spec get_transaction(Moov.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a single wallet transaction.

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

@spec list(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists an account's wallets.

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

@spec list_adjustments(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists balance adjustments for an account.

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

@spec list_transactions(Moov.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists a wallet's transactions. Filter with opts[:query], e.g. query: [status: "completed"].

update(client, account_id, wallet_id, params)

@spec update(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Updates a wallet's description/metadata.