iban-0.1.1.1: Validate and generate IBANs

Safe HaskellSafe
LanguageHaskell2010

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 IBAN Source

try to parse an IBAN

prettyIBAN :: IBAN -> Text Source

show a IBAN in 4-blocks

country :: IBAN -> CountryCode Source

Get the country of the IBAN

checkStructure :: BBANStructure -> Text -> Bool Source

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

mod97_10 :: Text -> Int Source

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