SwissQrBill.CreditorInformation (swiss_qr_bill v0.1.3)

Copy Markdown View Source

Holds the creditor's IBAN and provides QR-IBAN detection.

Summary

Functions

Returns the IBAN formatted in groups of 4.

Creates creditor information from an IBAN string. Whitespace is stripped and the IBAN is uppercased.

Returns the QR code data fields.

Returns true if the IBAN is a QR-IBAN (IID in range 30000-31999). QR-IBANs have the institution identification at positions 5-9 (1-indexed).

Types

t()

@type t() :: %SwissQrBill.CreditorInformation{iban: String.t()}

Functions

formatted_iban(creditor_information)

@spec formatted_iban(t()) :: String.t()

Returns the IBAN formatted in groups of 4.

new(iban)

@spec new(String.t()) :: t()

Creates creditor information from an IBAN string. Whitespace is stripped and the IBAN is uppercased.

qr_code_data(creditor_information)

@spec qr_code_data(t()) :: [String.t()]

Returns the QR code data fields.

qr_iban?(creditor_information)

@spec qr_iban?(t()) :: boolean()

Returns true if the IBAN is a QR-IBAN (IID in range 30000-31999). QR-IBANs have the institution identification at positions 5-9 (1-indexed).