diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/codes/Country.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/codes/Country.kt index 9445de2..36ae69e 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/codes/Country.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/codes/Country.kt @@ -1,255 +1,255 @@ package net.codinux.invoicing.model.codes -enum class Country(val alpha2Code: String, val alpha3Code: String, val numericCode: Int?, val numericCodeAsString: String?, val englishName: String) { - Afghanistan("AF", "AFG", 4, "004", "Afghanistan"), - AlandIslands("AX", "ALA", 248, "248", "Åland Islands"), - Albania("AL", "ALB", 8, "008", "Albania"), - Algeria("DZ", "DZA", 12, "012", "Algeria"), - AmericanSamoa("AS", "ASM", 16, "016", "American Samoa"), - Andorra("AD", "AND", 20, "020", "Andorra"), - Angola("AO", "AGO", 24, "024", "Angola"), - Anguilla("AI", "AIA", 660, "660", "Anguilla"), - Antarctica("AQ", "ATA", 10, "010", "Antarctica"), - AntiguaAndBarbuda("AG", "ATG", 28, "028", "Antigua & Barbuda"), - Argentina("AR", "ARG", 32, "032", "Argentina"), - Armenia("AM", "ARM", 51, "051", "Armenia"), - Aruba("AW", "ABW", 533, "533", "Aruba"), - Australia("AU", "AUS", 36, "036", "Australia"), - Austria("AT", "AUT", 40, "040", "Austria"), - Azerbaijan("AZ", "AZE", 31, "031", "Azerbaijan"), - Bahamas("BS", "BHS", 44, "044", "Bahamas"), - Bahrain("BH", "BHR", 48, "048", "Bahrain"), - Bangladesh("BD", "BGD", 50, "050", "Bangladesh"), - Barbados("BB", "BRB", 52, "052", "Barbados"), - Belarus("BY", "BLR", 112, "112", "Belarus"), - Belgium("BE", "BEL", 56, "056", "Belgium"), - Belize("BZ", "BLZ", 84, "084", "Belize"), - Benin("BJ", "BEN", 204, "204", "Benin"), - Bermuda("BM", "BMU", 60, "060", "Bermuda"), - Bhutan("BT", "BTN", 64, "064", "Bhutan"), - Bolivia("BO", "BOL", 68, "068", "Bolivia"), - BosniaAndHerzegovina("BA", "BIH", 70, "070", "Bosnia & Herzegovina"), - Botswana("BW", "BWA", 72, "072", "Botswana"), - BouvetIsland("BV", "BVT", 74, "074", "Bouvet Island"), - Brazil("BR", "BRA", 76, "076", "Brazil"), - BritishIndianOceanTerritory("IO", "IOT", 86, "086", "British Indian Ocean Territory"), - BritishVirginIslands("VG", "VGB", 92, "092", "British Virgin Islands"), - Brunei("BN", "BRN", 96, "096", "Brunei"), - Bulgaria("BG", "BGR", 100, "100", "Bulgaria"), - BurkinaFaso("BF", "BFA", 854, "854", "Burkina Faso"), - Burundi("BI", "BDI", 108, "108", "Burundi"), - Cambodia("KH", "KHM", 116, "116", "Cambodia"), - Cameroon("CM", "CMR", 120, "120", "Cameroon"), - Canada("CA", "CAN", 124, "124", "Canada"), - CapeVerde("CV", "CPV", 132, "132", "Cape Verde"), - CaribbeanNetherlands("BQ", "BES", 535, "535", "Caribbean Netherlands"), - CaymanIslands("KY", "CYM", 136, "136", "Cayman Islands"), - CentralAfricanRepublic("CF", "CAF", 140, "140", "Central African Republic"), - Chad("TD", "TCD", 148, "148", "Chad"), - Chile("CL", "CHL", 152, "152", "Chile"), - China("CN", "CHN", 156, "156", "China"), - ChristmasIsland("CX", "CXR", 162, "162", "Christmas Island"), - CocosKeelingIslands("CC", "CCK", 166, "166", "Cocos (Keeling) Islands"), - Colombia("CO", "COL", 170, "170", "Colombia"), - Comoros("KM", "COM", 174, "174", "Comoros"), - Congo("CG", "COG", 178, "178", "Congo - Brazzaville"), - Congo_DemocraticRepublic("CD", "COD", 180, "180", "Congo - Kinshasa"), - CookIslands("CK", "COK", 184, "184", "Cook Islands"), - CostaRica("CR", "CRI", 188, "188", "Costa Rica"), - CoteDIvoire("CI", "CIV", 384, "384", "Côte d’Ivoire"), - Croatia("HR", "HRV", 191, "191", "Croatia"), - Cuba("CU", "CUB", 192, "192", "Cuba"), - Curacao("CW", "CUW", 531, "531", "Curaçao"), - Cyprus("CY", "CYP", 196, "196", "Cyprus"), - Czechia("CZ", "CZE", 203, "203", "Czechia"), - Denmark("DK", "DNK", 208, "208", "Denmark"), - Djibouti("DJ", "DJI", 262, "262", "Djibouti"), - Dominica("DM", "DMA", 212, "212", "Dominica"), - DominicanRepublic("DO", "DOM", 214, "214", "Dominican Republic"), - Ecuador("EC", "ECU", 218, "218", "Ecuador"), - Egypt("EG", "EGY", 818, "818", "Egypt"), - ElSalvador("SV", "SLV", 222, "222", "El Salvador"), - EquatorialGuinea("GQ", "GNQ", 226, "226", "Equatorial Guinea"), - Eritrea("ER", "ERI", 232, "232", "Eritrea"), - Estonia("EE", "EST", 233, "233", "Estonia"), - Eswatini("SZ", "SWZ", 748, "748", "Eswatini"), - Ethiopia("ET", "ETH", 231, "231", "Ethiopia"), - FalklandIslands("FK", "FLK", 238, "238", "Falkland Islands"), - FaroeIslands("FO", "FRO", 234, "234", "Faroe Islands"), - Fiji("FJ", "FJI", 242, "242", "Fiji"), - Finland("FI", "FIN", 246, "246", "Finland"), - France("FR", "FRA", 250, "250", "France"), - FrenchGuiana("GF", "GUF", 254, "254", "French Guiana"), - FrenchPolynesia("PF", "PYF", 258, "258", "French Polynesia"), - FrenchSouthernTerritories("TF", "ATF", 260, "260", "French Southern Territories"), - Gabon("GA", "GAB", 266, "266", "Gabon"), - Gambia("GM", "GMB", 270, "270", "Gambia"), - Georgia("GE", "GEO", 268, "268", "Georgia"), - Germany("DE", "DEU", 276, "276", "Germany"), - Ghana("GH", "GHA", 288, "288", "Ghana"), - Gibraltar("GI", "GIB", 292, "292", "Gibraltar"), - Greece("GR", "GRC", 300, "300", "Greece"), - Greenland("GL", "GRL", 304, "304", "Greenland"), - Grenada("GD", "GRD", 308, "308", "Grenada"), - Guadeloupe("GP", "GLP", 312, "312", "Guadeloupe"), - Guam("GU", "GUM", 316, "316", "Guam"), - Guatemala("GT", "GTM", 320, "320", "Guatemala"), - Guernsey("GG", "GGY", 831, "831", "Guernsey"), - Guinea("GN", "GIN", 324, "324", "Guinea"), - GuineaBissau("GW", "GNB", 624, "624", "Guinea-Bissau"), - Guyana("GY", "GUY", 328, "328", "Guyana"), - Haiti("HT", "HTI", 332, "332", "Haiti"), - HeardAndMcDonaldIslands("HM", "HMD", 334, "334", "Heard & McDonald Islands"), - Honduras("HN", "HND", 340, "340", "Honduras"), - HongKong("HK", "HKG", 344, "344", "Hong Kong SAR China"), - Hungary("HU", "HUN", 348, "348", "Hungary"), - Iceland("IS", "ISL", 352, "352", "Iceland"), - India("IN", "IND", 356, "356", "India"), - Indonesia("ID", "IDN", 360, "360", "Indonesia"), - Iran("IR", "IRN", 364, "364", "Iran"), - Iraq("IQ", "IRQ", 368, "368", "Iraq"), - Ireland("IE", "IRL", 372, "372", "Ireland"), - IsleOfMan("IM", "IMN", 833, "833", "Isle of Man"), - Israel("IL", "ISR", 376, "376", "Israel"), - Italy("IT", "ITA", 380, "380", "Italy"), - Jamaica("JM", "JAM", 388, "388", "Jamaica"), - Japan("JP", "JPN", 392, "392", "Japan"), - Jersey("JE", "JEY", 832, "832", "Jersey"), - Jordan("JO", "JOR", 400, "400", "Jordan"), - Kazakhstan("KZ", "KAZ", 398, "398", "Kazakhstan"), - Kenya("KE", "KEN", 404, "404", "Kenya"), - Kiribati("KI", "KIR", 296, "296", "Kiribati"), - Kosovo("1A", "1A", null, null, "Kosovo"), - Kuwait("KW", "KWT", 414, "414", "Kuwait"), - Kyrgyzstan("KG", "KGZ", 417, "417", "Kyrgyzstan"), - Laos("LA", "LAO", 418, "418", "Laos"), - Latvia("LV", "LVA", 428, "428", "Latvia"), - Lebanon("LB", "LBN", 422, "422", "Lebanon"), - Lesotho("LS", "LSO", 426, "426", "Lesotho"), - Liberia("LR", "LBR", 430, "430", "Liberia"), - Libya("LY", "LBY", 434, "434", "Libya"), - Liechtenstein("LI", "LIE", 438, "438", "Liechtenstein"), - Lithuania("LT", "LTU", 440, "440", "Lithuania"), - Luxembourg("LU", "LUX", 442, "442", "Luxembourg"), - Macao("MO", "MAC", 446, "446", "Macao SAR China"), - Madagascar("MG", "MDG", 450, "450", "Madagascar"), - Malawi("MW", "MWI", 454, "454", "Malawi"), - Malaysia("MY", "MYS", 458, "458", "Malaysia"), - Maldives("MV", "MDV", 462, "462", "Maldives"), - Mali("ML", "MLI", 466, "466", "Mali"), - Malta("MT", "MLT", 470, "470", "Malta"), - MarshallIslands("MH", "MHL", 584, "584", "Marshall Islands"), - Martinique("MQ", "MTQ", 474, "474", "Martinique"), - Mauritania("MR", "MRT", 478, "478", "Mauritania"), - Mauritius("MU", "MUS", 480, "480", "Mauritius"), - Mayotte("YT", "MYT", 175, "175", "Mayotte"), - Mexico("MX", "MEX", 484, "484", "Mexico"), - Micronesia("FM", "FSM", 583, "583", "Micronesia"), - Moldova("MD", "MDA", 498, "498", "Moldova"), - Monaco("MC", "MCO", 492, "492", "Monaco"), - Mongolia("MN", "MNG", 496, "496", "Mongolia"), - Montenegro("ME", "MNE", 499, "499", "Montenegro"), - Montserrat("MS", "MSR", 500, "500", "Montserrat"), - Morocco("MA", "MAR", 504, "504", "Morocco"), - Mozambique("MZ", "MOZ", 508, "508", "Mozambique"), - MyanmarBurma("MM", "MMR", 104, "104", "Myanmar (Burma)"), - Namibia("NA", "NAM", 516, "516", "Namibia"), - Nauru("NR", "NRU", 520, "520", "Nauru"), - Nepal("NP", "NPL", 524, "524", "Nepal"), - Netherlands("NL", "NLD", 528, "528", "Netherlands"), - NewCaledonia("NC", "NCL", 540, "540", "New Caledonia"), - NewZealand("NZ", "NZL", 554, "554", "New Zealand"), - Nicaragua("NI", "NIC", 558, "558", "Nicaragua"), - Niger("NE", "NER", 562, "562", "Niger"), - Nigeria("NG", "NGA", 566, "566", "Nigeria"), - Niue("NU", "NIU", 570, "570", "Niue"), - NorfolkIsland("NF", "NFK", 574, "574", "Norfolk Island"), - NorthKorea("KP", "PRK", 408, "408", "North Korea"), - NorthMacedonia("MK", "MKD", 807, "807", "North Macedonia"), - NorthernIreland("XI", "XI", null, null, "United Kingdom (Northern Ireland)"), - NorthernMarianaIslands("MP", "MNP", 580, "580", "Northern Mariana Islands"), - Norway("NO", "NOR", 578, "578", "Norway"), - Oman("OM", "OMN", 512, "512", "Oman"), - Pakistan("PK", "PAK", 586, "586", "Pakistan"), - Palau("PW", "PLW", 585, "585", "Palau"), - Palestine("PS", "PSE", 275, "275", "Palestinian Territories"), - Panama("PA", "PAN", 591, "591", "Panama"), - PapuaNewGuinea("PG", "PNG", 598, "598", "Papua New Guinea"), - Paraguay("PY", "PRY", 600, "600", "Paraguay"), - Peru("PE", "PER", 604, "604", "Peru"), - Philippines("PH", "PHL", 608, "608", "Philippines"), - PitcairnIslands("PN", "PCN", 612, "612", "Pitcairn Islands"), - Poland("PL", "POL", 616, "616", "Poland"), - Portugal("PT", "PRT", 620, "620", "Portugal"), - PuertoRico("PR", "PRI", 630, "630", "Puerto Rico"), - Qatar("QA", "QAT", 634, "634", "Qatar"), - Reunion("RE", "REU", 638, "638", "Réunion"), - Romania("RO", "ROU", 642, "642", "Romania"), - Russia("RU", "RUS", 643, "643", "Russia"), - Rwanda("RW", "RWA", 646, "646", "Rwanda"), - SaintBarthelemy("BL", "BLM", 652, "652", "St. Barthélemy"), - SaintHelena("SH", "SHN", 654, "654", "St. Helena"), - SaintKittsAndNevis("KN", "KNA", 659, "659", "St. Kitts & Nevis"), - SaintLucia("LC", "LCA", 662, "662", "St. Lucia"), - SaintMartin("MF", "MAF", 663, "663", "St. Martin"), - SaintPierreAndMiquelon("PM", "SPM", 666, "666", "St. Pierre & Miquelon"), - SaintVincentAndGrenadines("VC", "VCT", 670, "670", "St. Vincent & Grenadines"), - Samoa("WS", "WSM", 882, "882", "Samoa"), - SanMarino("SM", "SMR", 674, "674", "San Marino"), - SaoTomeAndPrincipe("ST", "STP", 678, "678", "São Tomé & Príncipe"), - SaudiArabia("SA", "SAU", 682, "682", "Saudi Arabia"), - Senegal("SN", "SEN", 686, "686", "Senegal"), - Serbia("RS", "SRB", 688, "688", "Serbia"), - Seychelles("SC", "SYC", 690, "690", "Seychelles"), - SierraLeone("SL", "SLE", 694, "694", "Sierra Leone"), - Singapore("SG", "SGP", 702, "702", "Singapore"), - SintMaarten("SX", "SXM", 534, "534", "Sint Maarten"), - Slovakia("SK", "SVK", 703, "703", "Slovakia"), - Slovenia("SI", "SVN", 705, "705", "Slovenia"), - SolomonIslands("SB", "SLB", 90, "090", "Solomon Islands"), - Somalia("SO", "SOM", 706, "706", "Somalia"), - SouthAfrica("ZA", "ZAF", 710, "710", "South Africa"), - SouthGeorgiaAndSouthSandwichIslands("GS", "SGS", 239, "239", "South Georgia & South Sandwich Islands"), - SouthKorea("KR", "KOR", 410, "410", "South Korea"), - SouthSudan("SS", "SSD", 728, "728", "South Sudan"), - Spain("ES", "ESP", 724, "724", "Spain"), - SriLanka("LK", "LKA", 144, "144", "Sri Lanka"), - Sudan("SD", "SDN", 729, "729", "Sudan"), - Suriname("SR", "SUR", 740, "740", "Suriname"), - SvalbardAndJanMayen("SJ", "SJM", 744, "744", "Svalbard & Jan Mayen"), - Sweden("SE", "SWE", 752, "752", "Sweden"), - Switzerland("CH", "CHE", 756, "756", "Switzerland"), - Syria("SY", "SYR", 760, "760", "Syria"), - Taiwan("TW", "TWN", 158, "158", "Taiwan"), - Tajikistan("TJ", "TJK", 762, "762", "Tajikistan"), - Tanzania("TZ", "TZA", 834, "834", "Tanzania"), - Thailand("TH", "THA", 764, "764", "Thailand"), - TimorLeste("TL", "TLS", 626, "626", "Timor-Leste"), - Togo("TG", "TGO", 768, "768", "Togo"), - Tokelau("TK", "TKL", 772, "772", "Tokelau"), - Tonga("TO", "TON", 776, "776", "Tonga"), - TrinidadAndTobago("TT", "TTO", 780, "780", "Trinidad & Tobago"), - Tunisia("TN", "TUN", 788, "788", "Tunisia"), - Turkiye("TR", "TUR", 792, "792", "Türkiye"), - Turkmenistan("TM", "TKM", 795, "795", "Turkmenistan"), - TurksAndCaicosIslands("TC", "TCA", 796, "796", "Turks & Caicos Islands"), - Tuvalu("TV", "TUV", 798, "798", "Tuvalu"), - USOutlyingIslands("UM", "UMI", 581, "581", "U.S. Outlying Islands"), - USVirginIslands("VI", "VIR", 850, "850", "U.S. Virgin Islands"), - Uganda("UG", "UGA", 800, "800", "Uganda"), - Ukraine("UA", "UKR", 804, "804", "Ukraine"), - UnitedArabEmirates("AE", "ARE", 784, "784", "United Arab Emirates"), - UnitedKingdom("GB", "GBR", 826, "826", "United Kingdom"), - UnitedStates("US", "USA", 840, "840", "United States"), - Uruguay("UY", "URY", 858, "858", "Uruguay"), - Uzbekistan("UZ", "UZB", 860, "860", "Uzbekistan"), - Vanuatu("VU", "VUT", 548, "548", "Vanuatu"), - VaticanCity("VA", "VAT", 336, "336", "Vatican City"), - Venezuela("VE", "VEN", 862, "862", "Venezuela"), - Vietnam("VN", "VNM", 704, "704", "Vietnam"), - WallisAndFutuna("WF", "WLF", 876, "876", "Wallis & Futuna"), - WesternSahara("EH", "ESH", 732, "732", "Western Sahara"), - Yemen("YE", "YEM", 887, "887", "Yemen"), - Zambia("ZM", "ZMB", 894, "894", "Zambia"), - Zimbabwe("ZW", "ZWE", 716, "716", "Zimbabwe"), +enum class Country(val alpha2Code: String, val alpha3Code: String, val numericCode: Int?, val numericCodeAsString: String?, val englishName: String, val isContainedIn: Set, val contains: Set) { + Afghanistan("AF", "AFG", 4, "004", "Afghanistan", setOf("034", "UN"), emptySet()), + AlandIslands("AX", "ALA", 248, "248", "Åland Islands", setOf("154"), emptySet()), + Albania("AL", "ALB", 8, "008", "Albania", setOf("039", "UN"), emptySet()), + Algeria("DZ", "DZA", 12, "012", "Algeria", setOf("015", "UN"), emptySet()), + AmericanSamoa("AS", "ASM", 16, "016", "American Samoa", setOf("061"), emptySet()), + Andorra("AD", "AND", 20, "020", "Andorra", setOf("039", "UN"), emptySet()), + Angola("AO", "AGO", 24, "024", "Angola", setOf("017", "UN"), emptySet()), + Anguilla("AI", "AIA", 660, "660", "Anguilla", setOf("029"), emptySet()), + Antarctica("AQ", "ATA", 10, "010", "Antarctica", setOf("QO"), emptySet()), + AntiguaAndBarbuda("AG", "ATG", 28, "028", "Antigua & Barbuda", setOf("029", "UN"), emptySet()), + Argentina("AR", "ARG", 32, "032", "Argentina", setOf("005", "UN"), emptySet()), + Armenia("AM", "ARM", 51, "051", "Armenia", setOf("145", "UN"), emptySet()), + Aruba("AW", "ABW", 533, "533", "Aruba", setOf("029"), emptySet()), + Australia("AU", "AUS", 36, "036", "Australia", setOf("053", "UN"), emptySet()), + Austria("AT", "AUT", 40, "040", "Austria", setOf("155", "EU", "EZ", "UN"), emptySet()), + Azerbaijan("AZ", "AZE", 31, "031", "Azerbaijan", setOf("145", "UN"), emptySet()), + Bahamas("BS", "BHS", 44, "044", "Bahamas", setOf("029", "UN"), emptySet()), + Bahrain("BH", "BHR", 48, "048", "Bahrain", setOf("145", "UN"), emptySet()), + Bangladesh("BD", "BGD", 50, "050", "Bangladesh", setOf("034", "UN"), emptySet()), + Barbados("BB", "BRB", 52, "052", "Barbados", setOf("029", "UN"), emptySet()), + Belarus("BY", "BLR", 112, "112", "Belarus", setOf("151", "UN"), emptySet()), + Belgium("BE", "BEL", 56, "056", "Belgium", setOf("155", "EU", "EZ", "UN"), emptySet()), + Belize("BZ", "BLZ", 84, "084", "Belize", setOf("013", "UN"), emptySet()), + Benin("BJ", "BEN", 204, "204", "Benin", setOf("011", "UN"), emptySet()), + Bermuda("BM", "BMU", 60, "060", "Bermuda", setOf("021"), emptySet()), + Bhutan("BT", "BTN", 64, "064", "Bhutan", setOf("034", "UN"), emptySet()), + Bolivia("BO", "BOL", 68, "068", "Bolivia", setOf("005", "UN"), emptySet()), + BosniaAndHerzegovina("BA", "BIH", 70, "070", "Bosnia & Herzegovina", setOf("039", "UN"), emptySet()), + Botswana("BW", "BWA", 72, "072", "Botswana", setOf("018", "UN"), emptySet()), + BouvetIsland("BV", "BVT", 74, "074", "Bouvet Island", setOf("005"), emptySet()), + Brazil("BR", "BRA", 76, "076", "Brazil", setOf("005", "UN"), emptySet()), + BritishIndianOceanTerritory("IO", "IOT", 86, "086", "British Indian Ocean Territory", setOf("014"), emptySet()), + BritishVirginIslands("VG", "VGB", 92, "092", "British Virgin Islands", setOf("029"), emptySet()), + Brunei("BN", "BRN", 96, "096", "Brunei", setOf("035", "UN"), emptySet()), + Bulgaria("BG", "BGR", 100, "100", "Bulgaria", setOf("151", "EU", "UN"), emptySet()), + BurkinaFaso("BF", "BFA", 854, "854", "Burkina Faso", setOf("011", "UN"), emptySet()), + Burundi("BI", "BDI", 108, "108", "Burundi", setOf("014", "UN"), emptySet()), + Cambodia("KH", "KHM", 116, "116", "Cambodia", setOf("035", "UN"), emptySet()), + Cameroon("CM", "CMR", 120, "120", "Cameroon", setOf("017", "UN"), emptySet()), + Canada("CA", "CAN", 124, "124", "Canada", setOf("021", "UN"), emptySet()), + CapeVerde("CV", "CPV", 132, "132", "Cape Verde", setOf("011", "UN"), emptySet()), + CaribbeanNetherlands("BQ", "BES", 535, "535", "Caribbean Netherlands", setOf("029"), emptySet()), + CaymanIslands("KY", "CYM", 136, "136", "Cayman Islands", setOf("029"), emptySet()), + CentralAfricanRepublic("CF", "CAF", 140, "140", "Central African Republic", setOf("017", "UN"), emptySet()), + Chad("TD", "TCD", 148, "148", "Chad", setOf("017", "UN"), emptySet()), + Chile("CL", "CHL", 152, "152", "Chile", setOf("005", "UN"), emptySet()), + China("CN", "CHN", 156, "156", "China", setOf("030", "UN"), emptySet()), + ChristmasIsland("CX", "CXR", 162, "162", "Christmas Island", setOf("053"), emptySet()), + CocosKeelingIslands("CC", "CCK", 166, "166", "Cocos (Keeling) Islands", setOf("053"), emptySet()), + Colombia("CO", "COL", 170, "170", "Colombia", setOf("005", "UN"), emptySet()), + Comoros("KM", "COM", 174, "174", "Comoros", setOf("014", "UN"), emptySet()), + Congo("CG", "COG", 178, "178", "Congo - Brazzaville", setOf("017", "UN"), emptySet()), + Congo_DemocraticRepublic("CD", "COD", 180, "180", "Congo - Kinshasa", setOf("017", "UN"), emptySet()), + CookIslands("CK", "COK", 184, "184", "Cook Islands", setOf("061"), emptySet()), + CostaRica("CR", "CRI", 188, "188", "Costa Rica", setOf("013", "UN"), emptySet()), + CoteDIvoire("CI", "CIV", 384, "384", "Côte d’Ivoire", setOf("011", "UN"), emptySet()), + Croatia("HR", "HRV", 191, "191", "Croatia", setOf("039", "EU", "UN"), emptySet()), + Cuba("CU", "CUB", 192, "192", "Cuba", setOf("029", "UN"), emptySet()), + Curacao("CW", "CUW", 531, "531", "Curaçao", setOf("029"), emptySet()), + Cyprus("CY", "CYP", 196, "196", "Cyprus", setOf("145", "EU", "EZ", "UN"), emptySet()), + Czechia("CZ", "CZE", 203, "203", "Czechia", setOf("151", "EU", "UN"), emptySet()), + Denmark("DK", "DNK", 208, "208", "Denmark", setOf("154", "EU", "UN"), emptySet()), + Djibouti("DJ", "DJI", 262, "262", "Djibouti", setOf("014", "UN"), emptySet()), + Dominica("DM", "DMA", 212, "212", "Dominica", setOf("029", "UN"), emptySet()), + DominicanRepublic("DO", "DOM", 214, "214", "Dominican Republic", setOf("029", "UN"), emptySet()), + Ecuador("EC", "ECU", 218, "218", "Ecuador", setOf("005", "UN"), emptySet()), + Egypt("EG", "EGY", 818, "818", "Egypt", setOf("015", "UN"), emptySet()), + ElSalvador("SV", "SLV", 222, "222", "El Salvador", setOf("013", "UN"), emptySet()), + EquatorialGuinea("GQ", "GNQ", 226, "226", "Equatorial Guinea", setOf("017", "UN"), emptySet()), + Eritrea("ER", "ERI", 232, "232", "Eritrea", setOf("014", "UN"), emptySet()), + Estonia("EE", "EST", 233, "233", "Estonia", setOf("154", "EU", "EZ", "UN"), emptySet()), + Eswatini("SZ", "SWZ", 748, "748", "Eswatini", setOf("018", "UN"), emptySet()), + Ethiopia("ET", "ETH", 231, "231", "Ethiopia", setOf("014", "UN"), emptySet()), + FalklandIslands("FK", "FLK", 238, "238", "Falkland Islands", setOf("005"), emptySet()), + FaroeIslands("FO", "FRO", 234, "234", "Faroe Islands", setOf("154"), emptySet()), + Fiji("FJ", "FJI", 242, "242", "Fiji", setOf("054", "UN"), emptySet()), + Finland("FI", "FIN", 246, "246", "Finland", setOf("154", "EU", "EZ", "UN"), emptySet()), + France("FR", "FRA", 250, "250", "France", setOf("155", "EU", "EZ", "UN"), emptySet()), + FrenchGuiana("GF", "GUF", 254, "254", "French Guiana", setOf("005"), emptySet()), + FrenchPolynesia("PF", "PYF", 258, "258", "French Polynesia", setOf("061"), emptySet()), + FrenchSouthernTerritories("TF", "ATF", 260, "260", "French Southern Territories", setOf("014"), emptySet()), + Gabon("GA", "GAB", 266, "266", "Gabon", setOf("017", "UN"), emptySet()), + Gambia("GM", "GMB", 270, "270", "Gambia", setOf("011", "UN"), emptySet()), + Georgia("GE", "GEO", 268, "268", "Georgia", setOf("145", "UN"), emptySet()), + Germany("DE", "DEU", 276, "276", "Germany", setOf("155", "EU", "EZ", "UN"), emptySet()), + Ghana("GH", "GHA", 288, "288", "Ghana", setOf("011", "UN"), emptySet()), + Gibraltar("GI", "GIB", 292, "292", "Gibraltar", setOf("039"), emptySet()), + Greece("GR", "GRC", 300, "300", "Greece", setOf("039", "EU", "EZ", "UN"), emptySet()), + Greenland("GL", "GRL", 304, "304", "Greenland", setOf("021"), emptySet()), + Grenada("GD", "GRD", 308, "308", "Grenada", setOf("029", "UN"), emptySet()), + Guadeloupe("GP", "GLP", 312, "312", "Guadeloupe", setOf("029"), emptySet()), + Guam("GU", "GUM", 316, "316", "Guam", setOf("057"), emptySet()), + Guatemala("GT", "GTM", 320, "320", "Guatemala", setOf("013", "UN"), emptySet()), + Guernsey("GG", "GGY", 831, "831", "Guernsey", setOf("154"), emptySet()), + Guinea("GN", "GIN", 324, "324", "Guinea", setOf("011", "UN"), emptySet()), + GuineaBissau("GW", "GNB", 624, "624", "Guinea-Bissau", setOf("011", "UN"), emptySet()), + Guyana("GY", "GUY", 328, "328", "Guyana", setOf("005", "UN"), emptySet()), + Haiti("HT", "HTI", 332, "332", "Haiti", setOf("029", "UN"), emptySet()), + HeardAndMcDonaldIslands("HM", "HMD", 334, "334", "Heard & McDonald Islands", setOf("053"), emptySet()), + Honduras("HN", "HND", 340, "340", "Honduras", setOf("013", "UN"), emptySet()), + HongKong("HK", "HKG", 344, "344", "Hong Kong SAR China", setOf("030"), emptySet()), + Hungary("HU", "HUN", 348, "348", "Hungary", setOf("151", "EU", "UN"), emptySet()), + Iceland("IS", "ISL", 352, "352", "Iceland", setOf("154", "UN"), emptySet()), + India("IN", "IND", 356, "356", "India", setOf("034", "UN"), emptySet()), + Indonesia("ID", "IDN", 360, "360", "Indonesia", setOf("035", "UN"), emptySet()), + Iran("IR", "IRN", 364, "364", "Iran", setOf("034", "UN"), emptySet()), + Iraq("IQ", "IRQ", 368, "368", "Iraq", setOf("145", "UN"), emptySet()), + Ireland("IE", "IRL", 372, "372", "Ireland", setOf("154", "EU", "EZ", "UN"), emptySet()), + IsleOfMan("IM", "IMN", 833, "833", "Isle of Man", setOf("154"), emptySet()), + Israel("IL", "ISR", 376, "376", "Israel", setOf("145", "UN"), emptySet()), + Italy("IT", "ITA", 380, "380", "Italy", setOf("039", "EU", "EZ", "UN"), emptySet()), + Jamaica("JM", "JAM", 388, "388", "Jamaica", setOf("029", "UN"), emptySet()), + Japan("JP", "JPN", 392, "392", "Japan", setOf("030", "UN"), emptySet()), + Jersey("JE", "JEY", 832, "832", "Jersey", setOf("154"), emptySet()), + Jordan("JO", "JOR", 400, "400", "Jordan", setOf("145", "UN"), emptySet()), + Kazakhstan("KZ", "KAZ", 398, "398", "Kazakhstan", setOf("143", "UN"), emptySet()), + Kenya("KE", "KEN", 404, "404", "Kenya", setOf("014", "UN"), emptySet()), + Kiribati("KI", "KIR", 296, "296", "Kiribati", setOf("057", "UN"), emptySet()), + Kosovo("1A", "1A", null, null, "Kosovo", emptySet(), emptySet()), + Kuwait("KW", "KWT", 414, "414", "Kuwait", setOf("145", "UN"), emptySet()), + Kyrgyzstan("KG", "KGZ", 417, "417", "Kyrgyzstan", setOf("143", "UN"), emptySet()), + Laos("LA", "LAO", 418, "418", "Laos", setOf("035", "UN"), emptySet()), + Latvia("LV", "LVA", 428, "428", "Latvia", setOf("154", "EU", "EZ", "UN"), emptySet()), + Lebanon("LB", "LBN", 422, "422", "Lebanon", setOf("145", "UN"), emptySet()), + Lesotho("LS", "LSO", 426, "426", "Lesotho", setOf("018", "UN"), emptySet()), + Liberia("LR", "LBR", 430, "430", "Liberia", setOf("011", "UN"), emptySet()), + Libya("LY", "LBY", 434, "434", "Libya", setOf("015", "UN"), emptySet()), + Liechtenstein("LI", "LIE", 438, "438", "Liechtenstein", setOf("155", "UN"), emptySet()), + Lithuania("LT", "LTU", 440, "440", "Lithuania", setOf("154", "EU", "EZ", "UN"), emptySet()), + Luxembourg("LU", "LUX", 442, "442", "Luxembourg", setOf("155", "EU", "EZ", "UN"), emptySet()), + Macao("MO", "MAC", 446, "446", "Macao SAR China", setOf("030"), emptySet()), + Madagascar("MG", "MDG", 450, "450", "Madagascar", setOf("014", "UN"), emptySet()), + Malawi("MW", "MWI", 454, "454", "Malawi", setOf("014", "UN"), emptySet()), + Malaysia("MY", "MYS", 458, "458", "Malaysia", setOf("035", "UN"), emptySet()), + Maldives("MV", "MDV", 462, "462", "Maldives", setOf("034", "UN"), emptySet()), + Mali("ML", "MLI", 466, "466", "Mali", setOf("011", "UN"), emptySet()), + Malta("MT", "MLT", 470, "470", "Malta", setOf("039", "EU", "EZ", "UN"), emptySet()), + MarshallIslands("MH", "MHL", 584, "584", "Marshall Islands", setOf("057", "UN"), emptySet()), + Martinique("MQ", "MTQ", 474, "474", "Martinique", setOf("029"), emptySet()), + Mauritania("MR", "MRT", 478, "478", "Mauritania", setOf("011", "UN"), emptySet()), + Mauritius("MU", "MUS", 480, "480", "Mauritius", setOf("014", "UN"), emptySet()), + Mayotte("YT", "MYT", 175, "175", "Mayotte", setOf("014"), emptySet()), + Mexico("MX", "MEX", 484, "484", "Mexico", setOf("013", "UN"), emptySet()), + Micronesia("FM", "FSM", 583, "583", "Micronesia", setOf("057", "UN"), emptySet()), + Moldova("MD", "MDA", 498, "498", "Moldova", setOf("151", "UN"), emptySet()), + Monaco("MC", "MCO", 492, "492", "Monaco", setOf("155", "UN"), emptySet()), + Mongolia("MN", "MNG", 496, "496", "Mongolia", setOf("030", "UN"), emptySet()), + Montenegro("ME", "MNE", 499, "499", "Montenegro", setOf("039", "UN"), emptySet()), + Montserrat("MS", "MSR", 500, "500", "Montserrat", setOf("029"), emptySet()), + Morocco("MA", "MAR", 504, "504", "Morocco", setOf("015", "UN"), emptySet()), + Mozambique("MZ", "MOZ", 508, "508", "Mozambique", setOf("014", "UN"), emptySet()), + MyanmarBurma("MM", "MMR", 104, "104", "Myanmar (Burma)", setOf("035", "UN"), emptySet()), + Namibia("NA", "NAM", 516, "516", "Namibia", setOf("018", "UN"), emptySet()), + Nauru("NR", "NRU", 520, "520", "Nauru", setOf("057", "UN"), emptySet()), + Nepal("NP", "NPL", 524, "524", "Nepal", setOf("034", "UN"), emptySet()), + Netherlands("NL", "NLD", 528, "528", "Netherlands", setOf("155", "EU", "EZ", "UN"), emptySet()), + NewCaledonia("NC", "NCL", 540, "540", "New Caledonia", setOf("054"), emptySet()), + NewZealand("NZ", "NZL", 554, "554", "New Zealand", setOf("053", "UN"), emptySet()), + Nicaragua("NI", "NIC", 558, "558", "Nicaragua", setOf("013", "UN"), emptySet()), + Niger("NE", "NER", 562, "562", "Niger", setOf("011", "UN"), emptySet()), + Nigeria("NG", "NGA", 566, "566", "Nigeria", setOf("011", "UN"), emptySet()), + Niue("NU", "NIU", 570, "570", "Niue", setOf("061"), emptySet()), + NorfolkIsland("NF", "NFK", 574, "574", "Norfolk Island", setOf("053"), emptySet()), + NorthKorea("KP", "PRK", 408, "408", "North Korea", setOf("030", "UN"), emptySet()), + NorthMacedonia("MK", "MKD", 807, "807", "North Macedonia", setOf("039", "UN"), emptySet()), + NorthernIreland("XI", "XI", null, null, "United Kingdom (Northern Ireland)", emptySet(), emptySet()), + NorthernMarianaIslands("MP", "MNP", 580, "580", "Northern Mariana Islands", setOf("057"), emptySet()), + Norway("NO", "NOR", 578, "578", "Norway", setOf("154", "UN"), emptySet()), + Oman("OM", "OMN", 512, "512", "Oman", setOf("145", "UN"), emptySet()), + Pakistan("PK", "PAK", 586, "586", "Pakistan", setOf("034", "UN"), emptySet()), + Palau("PW", "PLW", 585, "585", "Palau", setOf("057", "UN"), emptySet()), + Palestine("PS", "PSE", 275, "275", "Palestinian Territories", setOf("145"), emptySet()), + Panama("PA", "PAN", 591, "591", "Panama", setOf("013", "UN"), emptySet()), + PapuaNewGuinea("PG", "PNG", 598, "598", "Papua New Guinea", setOf("054", "UN"), emptySet()), + Paraguay("PY", "PRY", 600, "600", "Paraguay", setOf("005", "UN"), emptySet()), + Peru("PE", "PER", 604, "604", "Peru", setOf("005", "UN"), emptySet()), + Philippines("PH", "PHL", 608, "608", "Philippines", setOf("035", "UN"), emptySet()), + PitcairnIslands("PN", "PCN", 612, "612", "Pitcairn Islands", setOf("061"), emptySet()), + Poland("PL", "POL", 616, "616", "Poland", setOf("151", "EU", "UN"), emptySet()), + Portugal("PT", "PRT", 620, "620", "Portugal", setOf("039", "EU", "EZ", "UN"), emptySet()), + PuertoRico("PR", "PRI", 630, "630", "Puerto Rico", setOf("029"), emptySet()), + Qatar("QA", "QAT", 634, "634", "Qatar", setOf("145", "UN"), emptySet()), + Reunion("RE", "REU", 638, "638", "Réunion", setOf("014"), emptySet()), + Romania("RO", "ROU", 642, "642", "Romania", setOf("151", "EU", "UN"), emptySet()), + Russia("RU", "RUS", 643, "643", "Russia", setOf("151", "UN"), emptySet()), + Rwanda("RW", "RWA", 646, "646", "Rwanda", setOf("014", "UN"), emptySet()), + SaintBarthelemy("BL", "BLM", 652, "652", "St. Barthélemy", setOf("029"), emptySet()), + SaintHelena("SH", "SHN", 654, "654", "St. Helena", setOf("011"), emptySet()), + SaintKittsAndNevis("KN", "KNA", 659, "659", "St. Kitts & Nevis", setOf("029", "UN"), emptySet()), + SaintLucia("LC", "LCA", 662, "662", "St. Lucia", setOf("029", "UN"), emptySet()), + SaintMartin("MF", "MAF", 663, "663", "St. Martin", setOf("029"), emptySet()), + SaintPierreAndMiquelon("PM", "SPM", 666, "666", "St. Pierre & Miquelon", setOf("021"), emptySet()), + SaintVincentAndGrenadines("VC", "VCT", 670, "670", "St. Vincent & Grenadines", setOf("029", "UN"), emptySet()), + Samoa("WS", "WSM", 882, "882", "Samoa", setOf("061", "UN"), emptySet()), + SanMarino("SM", "SMR", 674, "674", "San Marino", setOf("039", "UN"), emptySet()), + SaoTomeAndPrincipe("ST", "STP", 678, "678", "São Tomé & Príncipe", setOf("017", "UN"), emptySet()), + SaudiArabia("SA", "SAU", 682, "682", "Saudi Arabia", setOf("145", "UN"), emptySet()), + Senegal("SN", "SEN", 686, "686", "Senegal", setOf("011", "UN"), emptySet()), + Serbia("RS", "SRB", 688, "688", "Serbia", setOf("039", "UN"), emptySet()), + Seychelles("SC", "SYC", 690, "690", "Seychelles", setOf("014", "UN"), emptySet()), + SierraLeone("SL", "SLE", 694, "694", "Sierra Leone", setOf("011", "UN"), emptySet()), + Singapore("SG", "SGP", 702, "702", "Singapore", setOf("035", "UN"), emptySet()), + SintMaarten("SX", "SXM", 534, "534", "Sint Maarten", setOf("029"), emptySet()), + Slovakia("SK", "SVK", 703, "703", "Slovakia", setOf("151", "EU", "EZ", "UN"), emptySet()), + Slovenia("SI", "SVN", 705, "705", "Slovenia", setOf("039", "EU", "EZ", "UN"), emptySet()), + SolomonIslands("SB", "SLB", 90, "090", "Solomon Islands", setOf("054", "UN"), emptySet()), + Somalia("SO", "SOM", 706, "706", "Somalia", setOf("014", "UN"), emptySet()), + SouthAfrica("ZA", "ZAF", 710, "710", "South Africa", setOf("018", "UN"), emptySet()), + SouthGeorgiaAndSouthSandwichIslands("GS", "SGS", 239, "239", "South Georgia & South Sandwich Islands", setOf("005"), emptySet()), + SouthKorea("KR", "KOR", 410, "410", "South Korea", setOf("030", "UN"), emptySet()), + SouthSudan("SS", "SSD", 728, "728", "South Sudan", setOf("014", "UN"), emptySet()), + Spain("ES", "ESP", 724, "724", "Spain", setOf("039", "EU", "EZ", "UN"), emptySet()), + SriLanka("LK", "LKA", 144, "144", "Sri Lanka", setOf("034", "UN"), emptySet()), + Sudan("SD", "SDN", 729, "729", "Sudan", setOf("015", "UN"), emptySet()), + Suriname("SR", "SUR", 740, "740", "Suriname", setOf("005", "UN"), emptySet()), + SvalbardAndJanMayen("SJ", "SJM", 744, "744", "Svalbard & Jan Mayen", setOf("154"), emptySet()), + Sweden("SE", "SWE", 752, "752", "Sweden", setOf("154", "EU", "UN"), emptySet()), + Switzerland("CH", "CHE", 756, "756", "Switzerland", setOf("155", "UN"), emptySet()), + Syria("SY", "SYR", 760, "760", "Syria", setOf("145", "UN"), emptySet()), + Taiwan("TW", "TWN", 158, "158", "Taiwan", setOf("030"), emptySet()), + Tajikistan("TJ", "TJK", 762, "762", "Tajikistan", setOf("143", "UN"), emptySet()), + Tanzania("TZ", "TZA", 834, "834", "Tanzania", setOf("014", "UN"), emptySet()), + Thailand("TH", "THA", 764, "764", "Thailand", setOf("035", "UN"), emptySet()), + TimorLeste("TL", "TLS", 626, "626", "Timor-Leste", setOf("035", "UN"), emptySet()), + Togo("TG", "TGO", 768, "768", "Togo", setOf("011", "UN"), emptySet()), + Tokelau("TK", "TKL", 772, "772", "Tokelau", setOf("061"), emptySet()), + Tonga("TO", "TON", 776, "776", "Tonga", setOf("061", "UN"), emptySet()), + TrinidadAndTobago("TT", "TTO", 780, "780", "Trinidad & Tobago", setOf("029", "UN"), emptySet()), + Tunisia("TN", "TUN", 788, "788", "Tunisia", setOf("015", "UN"), emptySet()), + Turkiye("TR", "TUR", 792, "792", "Türkiye", setOf("145", "UN"), emptySet()), + Turkmenistan("TM", "TKM", 795, "795", "Turkmenistan", setOf("143", "UN"), emptySet()), + TurksAndCaicosIslands("TC", "TCA", 796, "796", "Turks & Caicos Islands", setOf("029"), emptySet()), + Tuvalu("TV", "TUV", 798, "798", "Tuvalu", setOf("061", "UN"), emptySet()), + USOutlyingIslands("UM", "UMI", 581, "581", "U.S. Outlying Islands", setOf("057"), emptySet()), + USVirginIslands("VI", "VIR", 850, "850", "U.S. Virgin Islands", setOf("029"), emptySet()), + Uganda("UG", "UGA", 800, "800", "Uganda", setOf("014", "UN"), emptySet()), + Ukraine("UA", "UKR", 804, "804", "Ukraine", setOf("151", "UN"), emptySet()), + UnitedArabEmirates("AE", "ARE", 784, "784", "United Arab Emirates", setOf("145", "UN"), emptySet()), + UnitedKingdom("GB", "GBR", 826, "826", "United Kingdom", setOf("154", "UN"), emptySet()), + UnitedStates("US", "USA", 840, "840", "United States", setOf("021", "UN"), emptySet()), + Uruguay("UY", "URY", 858, "858", "Uruguay", setOf("005", "UN"), emptySet()), + Uzbekistan("UZ", "UZB", 860, "860", "Uzbekistan", setOf("143", "UN"), emptySet()), + Vanuatu("VU", "VUT", 548, "548", "Vanuatu", setOf("054", "UN"), emptySet()), + VaticanCity("VA", "VAT", 336, "336", "Vatican City", setOf("039"), emptySet()), + Venezuela("VE", "VEN", 862, "862", "Venezuela", setOf("005", "UN"), emptySet()), + Vietnam("VN", "VNM", 704, "704", "Vietnam", setOf("035", "UN"), emptySet()), + WallisAndFutuna("WF", "WLF", 876, "876", "Wallis & Futuna", setOf("061"), emptySet()), + WesternSahara("EH", "ESH", 732, "732", "Western Sahara", setOf("015"), emptySet()), + Yemen("YE", "YEM", 887, "887", "Yemen", setOf("145", "UN"), emptySet()), + Zambia("ZM", "ZMB", 894, "894", "Zambia", setOf("014", "UN"), emptySet()), + Zimbabwe("ZW", "ZWE", 716, "716", "Zimbabwe", setOf("014", "UN"), emptySet()), } \ No newline at end of file diff --git a/e-invoice-spec-parser/src/main/kotlin/net/codinux/invoicing/parser/CodeGenerator.kt b/e-invoice-spec-parser/src/main/kotlin/net/codinux/invoicing/parser/CodeGenerator.kt index 1ae0810..fe8da74 100644 --- a/e-invoice-spec-parser/src/main/kotlin/net/codinux/invoicing/parser/CodeGenerator.kt +++ b/e-invoice-spec-parser/src/main/kotlin/net/codinux/invoicing/parser/CodeGenerator.kt @@ -121,6 +121,8 @@ class CodeGenerator { Column(2, "numericCode", "Int"), Column(3, "numericCodeAsString", "String"), Column(4, "englishName", "String"), + Column(5, "isContainedIn", "Set"), + Column(6, "contains", "Set"), ) val cefByIsoCode = cefCodeList.rows.associateBy { it.values[0] } @@ -129,7 +131,8 @@ class CodeGenerator { val rows = cefByIsoCode.map { (isoCode, cefRow) -> val values = zugferdByIsoCode[isoCode]!!.first().values val i18nRegion = i18nRegionsByCode[isoCode] - Row(listOf(isoCode, i18nRegion?.alpha3Code ?: values[2], i18nRegion?.numericCode, i18nRegion?.numericCodeAsString, i18nRegion?.englishName ?: values[0]), false, fixCountryName(i18nRegion?.name ?: values[0])) + Row(listOf(isoCode, i18nRegion?.alpha3Code ?: values[2], i18nRegion?.numericCode, i18nRegion?.numericCodeAsString, i18nRegion?.englishName ?: values[0], + i18nRegion?.isContainedIn.orEmpty().toSet(), i18nRegion?.contains.orEmpty().toSet()), false, fixCountryName(i18nRegion?.name ?: values[0])) } return columns to rows.sortedBy { it.enumName!! } // sort by englishName