StarlingBank.Balances (StarlingBank v1.0.0)

Copy Markdown View Source

Account balance — cleared, effective, available and pending balances.

Required scope: balance:read.

Summary

Functions

Fetches the balance for the given account.

Types

t()

@type t() :: %StarlingBank.Balances{
  accepted_overdraft_minor_units: integer(),
  amount_due_minor_units: integer(),
  available_to_spend_minor_units: integer(),
  cleared_balance_minor_units: integer(),
  currency: String.t(),
  effective_balance_minor_units: integer(),
  pending_transactions_minor_units: integer()
}

Functions

cast(map)

@spec cast(map()) :: t()

get(account_uid, client \\ nil)

@spec get(String.t(), StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, t()} | {:error, StarlingBank.Error.t()}

Fetches the balance for the given account.