A balance entry from <Bal>.
Balance types
| Atom | ISO code | Description |
|---|---|---|
:opening_booked | OPBD | Opening booked balance (mandatory) |
:closing_booked | CLBD | Closing booked balance (mandatory) |
:closing_available | CLAV | Closing available balance |
:interim_booked | ITBD | Interim booked balance |
:interim_available | ITAV | Interim available balance |
:forward_available | FWAV | Forward available balance |
{:other, code} | any | Unrecognised type code |
amount is always a positive Decimal. The sign of the balance is expressed via
credit_debit: :credit for a positive/credit balance, :debit for an
overdraft/negative balance.
Summary
Functions
Parses an ISO 20022 balance type code string into an atom.
Types
@type balance_type() :: :opening_booked | :closing_booked | :closing_available | :interim_booked | :interim_available | :forward_available | {:other, String.t()}
@type credit_debit() :: :credit | :debit
@type t() :: %ISO20022.Camt053.Balance{ amount: Decimal.t(), credit_debit: credit_debit(), currency: String.t(), date: Date.t(), type: balance_type() }
Functions
@spec parse_type(String.t()) :: balance_type()
Parses an ISO 20022 balance type code string into an atom.