Inttegro.FinancialAccounts.Wallet (inttegro v0.2.0)

Copy Markdown View Source

Represents Wallet data in the FinancialAccounts API.

Inttegro decodes API responses into this struct. Required fields are always present; optional fields are nil when they do not apply or were not returned. Follow the linked types in t/0 for nested domain values.

Creates, connects, and controls the accounts an application uses to move money.

A financial account represents a wallet, Ghana bank account, or Dosh account. The account owns its identity and verification state; push and pull are separate capabilities layered on top:

  • Push allows Inttegro to send payouts and other supported transfers to the account.
  • Pull allows supported payments to collect funds from the account. Enabling it records a mandate using the payer's real IP address and user agent.

Use create/3 when Inttegro should provision or manage the account and connect/3 when the account already exists outside Inttegro. Both accept one of the concrete request types linked from Inttegro.FinancialAccounts.CreateRequest.t/0. Connecting an account does not imply that every money-movement capability is enabled; inspect push_configuration, pull_configuration, and verification on the returned account.

Typical lifecycle

create or connect
  -> complete any required verification
  -> enable push, pull, or both
  -> use the account for supported activity
  -> disable a capability or disconnect the account

disconnect/3 stops new activity without erasing the account's history. reconnect/3 restores the relationship, but callers should still inspect which capabilities are active afterward.

All state-changing calls accept request options as their last argument. Supply a stable :idempotency_key when retrying the same logical change after a timeout or connection failure.

Summary

Types

t()

The decoded wallet value.

Functions

Builds a Inttegro.FinancialAccounts.Wallet and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.FinancialAccounts.Wallet{
  id: String.t(),
  mobile_money: Inttegro.FinancialAccounts.WalletMobileMoney.t() | nil,
  type: Inttegro.Wallets.Type.t()
}

The decoded wallet value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.FinancialAccounts.Wallet and raises KeyError when a required field is missing.