iban-0.1.0.0: Validate and generate IBANs

Safe HaskellNone

Finance.IBAN.Internal

Synopsis

Documentation

data IBAN Source

Constructors

IBAN 

Fields

rawIBAN :: Text
 

data IBANError Source

Constructors

IBANInvalidCharacters

The IBAN string contains invalid characters.

IBANInvalidStructure

The IBAN string has the wrong structure.

IBANWrongChecksum

The checksum does not match.

IBANInvalidCountry Text

The country identifier is either not a valid ISO3166-1 identifier or that country does not issue IBANs.

parseIBAN :: Text -> Either IBANError IBANSource

try to parse an IBAN

prettyIBAN :: IBAN -> TextSource

show a IBAN in 4-blocks

country :: IBAN -> CountryCodeSource

Get the country of the IBAN

checkStructure :: BBANStructure -> Text -> BoolSource

parseStructure :: Text -> (CountryCode, BBANStructure)Source

mod97_10 :: Text -> IntSource

Calculate the reordered decimal number mod 97 using Horner's rule. according to ISO 7064: mod97-10