ISO20022.Camt053.Balance (ISO20022 v0.1.0)

Copy Markdown View Source

A balance entry from <Bal>.

Balance types

AtomISO codeDescription
:opening_bookedOPBDOpening booked balance (mandatory)
:closing_bookedCLBDClosing booked balance (mandatory)
:closing_availableCLAVClosing available balance
:interim_bookedITBDInterim booked balance
:interim_availableITAVInterim available balance
:forward_availableFWAVForward available balance
{:other, code}anyUnrecognised 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

balance_type()

@type balance_type() ::
  :opening_booked
  | :closing_booked
  | :closing_available
  | :interim_booked
  | :interim_available
  | :forward_available
  | {:other, String.t()}

credit_debit()

@type credit_debit() :: :credit | :debit

t()

@type t() :: %ISO20022.Camt053.Balance{
  amount: Decimal.t(),
  credit_debit: credit_debit(),
  currency: String.t(),
  date: Date.t(),
  type: balance_type()
}

Functions

parse_type(code)

@spec parse_type(String.t()) :: balance_type()

Parses an ISO 20022 balance type code string into an atom.