Faker v0.8.0 Faker.Code.Iban

Functions for generating IBANs (International Bank Account Numbers).

The generated IBANs should pass validators that check the checksum, country code, format and length of the IBAN.

When more precision is required, you can pass predefined components that will be included in the generated IBAN. The components will not be validated, but are used when calculating the checksum.

Examples

iban #=> "IT34K5534420705QL3FT3SE7OTG"
iban "NL" #=> "NL90FWAC8717013067"
iban ["NL", "BE"] #=> "BE22587804301223"
iban "NL", ["ABNA"] #=> "NL39ABNA4314302905"

Summary

Functions

Returns a random IBAN from a random country

Returns a random IBAN for a specific country code, or a random country code from a given list of country codes

Returns a random IBAN starting with the given components. The given components are not validated but are included in the checksum

Functions

iban()
iban() :: binary

Returns a random IBAN from a random country

Examples

iban #=> "IT34K5534420705QL3FT3SE7OTG"
iban #=> "PL14120884438704753479627940"
iban #=> "EE634888052576910847"
iban #=> "ES1520374189803777170663"
iban(country_code_or_codes)
iban(binary | [binary]) :: binary

Returns a random IBAN for a specific country code, or a random country code from a given list of country codes.

Examples

iban "NL" #=> "NL90FWAC8717013067"
iban ["NL", "BE"] #=> "BE22587804301223"
iban(country_code, prefix_components)
iban(binary | [binary], [binary]) :: binary

Returns a random IBAN starting with the given components. The given components are not validated but are included in the checksum.

Examples

iban "NL", ["ABNA"] #=> "NL39ABNA4314302905"
iban "MC", ["FOO", "BAR"] #=> "MC70FOOBAR05"
iban "SM", ["A"] #=> "SM65A18398227594GI06519YAP4"