diff --git a/.gitignore b/.gitignore index 1326359..6bb5eb5 100644 --- a/.gitignore +++ b/.gitignore @@ -138,6 +138,8 @@ pyiso20022/pacs/ pyiso20022/head/ pyiso20022/camt/ pyiso20022/pain/ +pyiso20022/admi/ + pyiso20022/*.py temp/ diff --git a/README.md b/README.md index deb2b99..c78303c 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,14 @@ Table of Contents: _(Links to this page on GitHub)_ 1. [Parse an ISO 20022 PAIN.001 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#parse-an-iso-20022-pain001-message) 1. [Create a ISO 20022 PAIN.001 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#create-a-iso-20022-pain001-message) 1. [Create a ISO 20022 PACS.008 message](https://github.com/phoughton/pyiso20022/blob/main/README.md#create-a-iso-20022-pacs008-message) +1. [Convert a CAMT.053 into an Excel file](https://github.com/phoughton/pyiso20022/blob/main/README.md#convert-a-camt053-into-an-excel-file) # PYISO20022 an ISO 20022 Message Generator and Parser A package of classes to support payment, financial, securities & accounting message generation (for ISO 20022 messages). -These are the type of payments messages used in payment schemes such as FedNow, TARGET2, CHAPS, CBPR+, MEPS+ and other SWIFT/Wire Transfer style payments etc. You may hear them refered to as PACS messages (but there are others types as well, like CAMT.056 or PAIN.001). +These are the type of payments messages used in payment schemes such as FedNow, FedWire, TARGET2, CHAPS, CBPR+, MEPS+ and other SWIFT/Wire Transfer style payments etc. You may hear them refered to as PACS messages (but there are others types as well, like CAMT.056 or PAIN.001 or ADMI.004 etc). You might use these messages if you intitate payments from your company into a larger financial institution, in this scenario you will be generating PAIN (thats _Payment Initiation_) messages. @@ -296,7 +297,7 @@ with open("my_pacs_008_from_code.xml", "w") as xml_file: ``` -## Convert a CAMT.053 into an Excel file? +## Convert a CAMT.053 into an Excel file You can convert the entries in a CAMT.053 into a Excel file using the tools in pyiso20022. @@ -318,7 +319,7 @@ And you'll get something like this when you open your Excel file: ## Message types? -Currently pyiso20022 supports PACS, PAIN and CAMT messages as well as HEAD (header documents for the messages). +Currently pyiso20022 supports PACS, PAIN, ADMI and CAMT messages as well as HEAD (header documents for the messages). ## Source of truth? diff --git a/build_classes_from_xsds.bsh b/build_classes_from_xsds.bsh index dd7d27c..3da1144 100755 --- a/build_classes_from_xsds.bsh +++ b/build_classes_from_xsds.bsh @@ -16,7 +16,7 @@ generate_xsdata() { done } -REMOVE_DIRS=("pacs" "head" "pain" "camt") +REMOVE_DIRS=("pacs" "head" "pain" "camt" "admi") for a_dir in "${REMOVE_DIRS[@]}" do @@ -30,6 +30,8 @@ generate_xsdata "pacs" "xsd/payments_clearing_and_settlement" generate_xsdata "head" "xsd/business_application_header" generate_xsdata "pain" "xsd/payments_initiation" generate_xsdata "camt" "xsd/cash_management" +generate_xsdata "admi" "xsd/administration" + wait cat supported_msg_types.md | sort -n | uniq > supported_msg_types_final.md rm supported_msg_types.md diff --git a/setup.py b/setup.py index e0ed88e..b79eba8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyiso20022", - version="1.1.2", + version="1.2.2", author="Peter Houghton", author_email="pete@investigatingsoftware.co.uk", description="pyiso20022 is a library for generating ISO20022 messages in Python.", diff --git a/supported_msg_types_final.md b/supported_msg_types_final.md index 8c36ee0..2b0025d 100644 --- a/supported_msg_types_final.md +++ b/supported_msg_types_final.md @@ -1,4 +1,12 @@ # Supported message types +- admi.admi_002_001_01 +- admi.admi_004_001_02 +- admi.admi_006_001_01 +- admi.admi_007_001_01 +- admi.admi_009_001_02 +- admi.admi_010_001_02 +- admi.admi_011_001_01 +- admi.admi_017_001_01 - camt.camt_025_001_08 - camt.camt_026_001_01 - camt.camt_026_001_03 @@ -42,6 +50,7 @@ - camt.camt_053_001_09 - camt.camt_053_001_10 - camt.camt_053_001_11 +- camt.camt_053_001_12 - camt.camt_054_001_01 - camt.camt_054_001_02 - camt.camt_054_001_03 @@ -69,6 +78,7 @@ - camt.camt_060_001_04 - camt.camt_060_001_05 - camt.camt_060_001_06 +- camt.camt_060_001_07 - camt.camt_110_001_01 - camt.camt_111_001_01 - head.head_001_001_02 diff --git a/tests/create_pain_msgs_test.py b/tests/create_pain_msgs_test.py index 8e65f69..de16637 100644 --- a/tests/create_pain_msgs_test.py +++ b/tests/create_pain_msgs_test.py @@ -15,8 +15,7 @@ def create_pain001_001_008(): )) initg_pty = PartyIdentification43(nm="TXB Test Account", - id=initg_pty__id) - + id=initg_pty__id) grp_hdr = GroupHeader48(msg_id="test-160620", cre_dt_tm="2019-12-03T13:01:00+00:00", @@ -115,8 +114,9 @@ def test_parse_pain001_001_008(expected_dbtr_postcode, expected_cdtr_postcode): doc: Document = parser.parse(temp_file, Document, ) - dbtr_post_code = doc.cstmr_cdt_trf_initn.pmt_inf[0].dbtr.pstl_adr.pst_cd - cdtr_post_code = doc.cstmr_cdt_trf_initn.pmt_inf[0].cdt_trf_tx_inf[0].cdtr.pstl_adr.pst_cd + pmt_inf = doc.cstmr_cdt_trf_initn.pmt_inf[0] + dbtr_post_code = pmt_inf.dbtr.pstl_adr.pst_cd + cdtr_post_code = pmt_inf.cdt_trf_tx_inf[0].cdtr.pstl_adr.pst_cd assert dbtr_post_code == expected_dbtr_postcode assert cdtr_post_code == expected_cdtr_postcode diff --git a/xsd/administration/admi.002/admi.002.001.01.xsd b/xsd/administration/admi.002/admi.002.001.01.xsd new file mode 100644 index 0000000..4f2c1bb --- /dev/null +++ b/xsd/administration/admi.002/admi.002.001.01.xsd @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.004/admi.004.001.02.xsd b/xsd/administration/admi.004/admi.004.001.02.xsd new file mode 100644 index 0000000..a212e6b --- /dev/null +++ b/xsd/administration/admi.004/admi.004.001.02.xsd @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.006/admi.006.001.01.xsd b/xsd/administration/admi.006/admi.006.001.01.xsd new file mode 100644 index 0000000..a50876a --- /dev/null +++ b/xsd/administration/admi.006/admi.006.001.01.xsd @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.007/admi.007.001.01.xsd b/xsd/administration/admi.007/admi.007.001.01.xsd new file mode 100644 index 0000000..c0fa04e --- /dev/null +++ b/xsd/administration/admi.007/admi.007.001.01.xsd @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.009/admi.009.001.02.xsd b/xsd/administration/admi.009/admi.009.001.02.xsd new file mode 100644 index 0000000..6d9d4a1 --- /dev/null +++ b/xsd/administration/admi.009/admi.009.001.02.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.010/admi.010.001.02.xsd b/xsd/administration/admi.010/admi.010.001.02.xsd new file mode 100644 index 0000000..24ce1c9 --- /dev/null +++ b/xsd/administration/admi.010/admi.010.001.02.xsd @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.011/admi.011.001.01.xsd b/xsd/administration/admi.011/admi.011.001.01.xsd new file mode 100644 index 0000000..972e691 --- /dev/null +++ b/xsd/administration/admi.011/admi.011.001.01.xsd @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/administration/admi.017/admi.017.001.01.xsd b/xsd/administration/admi.017/admi.017.001.01.xsd new file mode 100644 index 0000000..a1efea3 --- /dev/null +++ b/xsd/administration/admi.017/admi.017.001.01.xsd @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/cash_management/camt.053/camt.053.001.12.xsd b/xsd/cash_management/camt.053/camt.053.001.12.xsd new file mode 100644 index 0000000..359c624 --- /dev/null +++ b/xsd/cash_management/camt.053/camt.053.001.12.xsd @@ -0,0 +1,2103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsd/cash_management/camt.060/camt.060.001.07.xsd b/xsd/cash_management/camt.060/camt.060.001.07.xsd new file mode 100644 index 0000000..772985e --- /dev/null +++ b/xsd/cash_management/camt.060/camt.060.001.07.xsd @@ -0,0 +1,572 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +