diff --git a/src/main/java/org/iban4j/bban/BbanStructure.java b/src/main/java/org/iban4j/bban/BbanStructure.java index ca3d91f..d074ef2 100644 --- a/src/main/java/org/iban4j/bban/BbanStructure.java +++ b/src/main/java/org/iban4j/bban/BbanStructure.java @@ -333,6 +333,33 @@ public class BbanStructure { new BbanStructure( BbanStructureEntry.bankCode(3, 'n'), BbanStructureEntry.accountNumber(13, 'c'))); + structures.put( + CountryCode.MA, + new BbanStructure( + BbanStructureEntry.bankCode(3, 'n'), + BbanStructureEntry.branchCode(5, 'n'), + BbanStructureEntry.accountNumber(16, 'n'))); + + structures.put( + CountryCode.MC, + new BbanStructure( + BbanStructureEntry.bankCode(5, 'n'), + BbanStructureEntry.branchCode(5, 'n'), + BbanStructureEntry.accountNumber(11, 'c'), + BbanStructureEntry.nationalCheckDigit(2, 'n'))); + + structures.put( + CountryCode.MD, + new BbanStructure( + BbanStructureEntry.bankCode(2, 'c'), BbanStructureEntry.accountNumber(18, 'c'))); + + structures.put( + CountryCode.ME, + new BbanStructure( + BbanStructureEntry.bankCode(3, 'n'), + BbanStructureEntry.accountNumber(13, 'n'), + BbanStructureEntry.nationalCheckDigit(2, 'n'))); + structures.put( CountryCode.MK, new BbanStructure( @@ -340,6 +367,14 @@ public class BbanStructure { BbanStructureEntry.accountNumber(10, 'c'), BbanStructureEntry.nationalCheckDigit(2, 'n'))); + structures.put( + CountryCode.MR, + new BbanStructure( + BbanStructureEntry.bankCode(5, 'n'), + BbanStructureEntry.branchCode(5, 'n'), + BbanStructureEntry.accountNumber(11, 'n'), + BbanStructureEntry.nationalCheckDigit(2, 'n'))); + structures.put( CountryCode.MT, new BbanStructure( @@ -347,14 +382,6 @@ public class BbanStructure { BbanStructureEntry.branchCode(5, 'n'), BbanStructureEntry.accountNumber(18, 'c'))); - structures.put( - CountryCode.MR, - new BbanStructure( - BbanStructureEntry.bankCode(5, 'n'), - BbanStructureEntry.branchCode(5, 'n'), - BbanStructureEntry.accountNumber(11, 'n'), - BbanStructureEntry.nationalCheckDigit(2, 'n'))); - structures.put( CountryCode.MU, new BbanStructure( @@ -362,26 +389,6 @@ public class BbanStructure { BbanStructureEntry.branchCode(2, 'n'), BbanStructureEntry.accountNumber(18, 'c'))); - structures.put( - CountryCode.MD, - new BbanStructure( - BbanStructureEntry.bankCode(2, 'c'), BbanStructureEntry.accountNumber(18, 'c'))); - - structures.put( - CountryCode.MC, - new BbanStructure( - BbanStructureEntry.bankCode(5, 'n'), - BbanStructureEntry.branchCode(5, 'n'), - BbanStructureEntry.accountNumber(11, 'c'), - BbanStructureEntry.nationalCheckDigit(2, 'n'))); - - structures.put( - CountryCode.ME, - new BbanStructure( - BbanStructureEntry.bankCode(3, 'n'), - BbanStructureEntry.accountNumber(13, 'n'), - BbanStructureEntry.nationalCheckDigit(2, 'n'))); - structures.put( CountryCode.NL, new BbanStructure( diff --git a/src/test/java/org/iban4j/TestDataHelper.java b/src/test/java/org/iban4j/TestDataHelper.java index 6892e5c..2703407 100644 --- a/src/test/java/org/iban4j/TestDataHelper.java +++ b/src/test/java/org/iban4j/TestDataHelper.java @@ -417,6 +417,15 @@ public static Collection getIbanData() { .build(), "LU280019400644750000" }, + { + new Iban.Builder() + .countryCode(CountryCode.MA) + .bankCode("011") + .branchCode("51900") + .accountNumber("0001205000534921") + .build(), + "MA64011519000001205000534921" + }, { new Iban.Builder() .countryCode(CountryCode.MF)