From 577cb84226b832118677b5338a4e91897117f53a Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Mon, 11 Aug 2025 17:18:26 +0200 Subject: test(integration): http post --- .../bruno/transaction-monitoring/01 - initiate.bru | 257 +++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 contrib/bruno/transaction-monitoring/01 - initiate.bru (limited to 'contrib/bruno/transaction-monitoring/01 - initiate.bru') diff --git a/contrib/bruno/transaction-monitoring/01 - initiate.bru b/contrib/bruno/transaction-monitoring/01 - initiate.bru new file mode 100644 index 0000000..4dee7a8 --- /dev/null +++ b/contrib/bruno/transaction-monitoring/01 - initiate.bru @@ -0,0 +1,257 @@ +meta { + name: 01 - initiate + type: http + seq: 2 +} + +post { + url: {{WARDEN_API_HOST}}/api/{{WARDEN_VERSION}}/pacs008 + body: json + auth: inherit +} + +body:json { + { + "f_i_to_f_i_cstmr_cdt_trf": { + "grp_hdr": { + "msg_id": "{{PACS008_MSG_ID}}", + "cre_dt_tm": "{{PACS008_CRE_DT_TM}}", + "nb_of_txs": "CLRG", + "sttlm_inf": { + "sttlm_mtd": 1 + } + }, + "splmtry_data": [], + "cdt_trf_tx_inf": [ + { + "pmt_id": { + "instr_id": "{{PACS008_INSTR_ID}}", + "end_to_end_id": "{{END_TO_END_ID}}" + }, + "intr_bk_sttlm_amt": { + "value": 294.3, + "ccy": "{{CCY}}" + }, + "instd_amt": { + "value": 294.3, + "ccy": "{{CCY}}" + }, + "xchg_rate": 1, + "chrg_br": 1, + "chrgs_inf": [ + { + "amt": { + "value": 0, + "ccy": "{{CCY}}" + }, + "agt": { + "fin_instn_id": { + "clr_sys_mmb_id": { + "mmb_id": "{{DEBTOR_FSP}}" + } + } + } + } + ], + "initg_pty": { + "nm": "April Blake Grant", + "id": { + "org_id": { + "othr": [] + }, + "prvt_id": { + "dt_and_plc_of_birth": { + "birth_dt": "1968-02-01", + "city_of_birth": "Unknown", + "ctry_of_birth": "ZZ" + }, + "othr": [ + { + "id": "+27730975224", + "schme_nm": { + "prtry": "MSISDN", + "cd": "cd-value" + } + } + ] + } + }, + "ctct_dtls": { + "mob_nb": "+27-730975224", + "othr": [] + } + }, + "dbtr": { + "nm": "April Blake Grant", + "id": { + "org_id": { + "othr": [] + }, + "prvt_id": { + "dt_and_plc_of_birth": { + "birth_dt": "2000-07-23", + "city_of_birth": "Unknown", + "ctry_of_birth": "ZZ" + }, + "othr": [ + { + "id": "{{DEBTOR_ID}}", + "schme_nm": { + "prtry": "EID", + "cd": "cd-value" + } + } + ] + } + }, + "ctct_dtls": { + "mob_nb": "+27-730975224", + "othr": [] + } + }, + "dbtr_acct": { + "id": { + "i_b_a_n": "value", + "othr": { + "id": "{{DEBTOR_ACCT_ID}}", + "schme_nm": { + "prtry": "MSISDN", + "cd": "value" + } + } + }, + "nm": "April Grant" + }, + "dbtr_agt": { + "fin_instn_id": { + "clr_sys_mmb_id": { + "mmb_id": "{{DEBTOR_FSP}}" + } + } + }, + "cdtr_agt": { + "fin_instn_id": { + "clr_sys_mmb_id": { + "mmb_id": "{{CREDITOR_FSP}}" + } + } + }, + "cdtr": { + "nm": "Felicia Easton Quill", + "id": { + "org_id": { + "othr": [] + }, + "prvt_id": { + "dt_and_plc_of_birth": { + "birth_dt": "1935-05-08", + "city_of_birth": "Unknown", + "ctry_of_birth": "ZZ" + }, + "othr": [ + { + "id": "{{CREDITOR_ID}}", + "schme_nm": { + "prtry": "EID", + "cd": "" + } + } + ] + } + }, + "ctct_dtls": { + "mob_nb": "+27-707650428", + "othr": [] + } + }, + "cdtr_acct": { + "id": { + "i_b_a_n": "", + "othr": { + "id": "{{CREDITOR_ACCT_ID}}", + "schme_nm": { + "prtry": "MSISDN", + "cd": "acc" + } + } + }, + "nm": "Felicia Quill" + }, + "purp": { + "cd": "MP2P", + "prtry": "" + }, + "rgltry_rptg": [ + { + "dtls": [ + { + "tp": "BALANCE OF PAYMENTS", + "cd": "100", + "inf": [] + } + ] + } + ], + "rmt_inf": { + "ustrd": [], + "strd": [] + }, + "splmtry_data": [ + { + "envlp": { + "doc": { + "xprtn": "2021-11-30T10:38:56.000Z", + "initg_pty": { + "glctn": { + "lat": "-3.1609", + "long": "38.3588" + } + } + } + } + } + ], + "instr_for_cdtr_agt": [], + "instr_for_nxt_agt": [], + "rltd_rmt_inf": [] + } + ] + } + } +} + +assert { + res.status: eq 201 +} + +script:pre-request { + const { nanoid } = require('nanoid'); + + bru.setVar("PACS008_MSG_ID", nanoid()) + bru.setVar("PACS008_CRE_DT_TM", new Date().toISOString()) + + bru.setVar("CREDITOR_FSP", "fsp001") + bru.setVar("DEBTOR_FSP", "fsp002") + + bru.setVar("PACS008_INSTR_ID", nanoid()) + + bru.setVar("END_TO_END_ID", nanoid()) + bru.setVar("CCY", "XTS") + + bru.setVar("DEBTOR_ID", nanoid()) + + bru.setVar("DEBTOR_ACCT_ID", nanoid()) + + bru.setVar("CREDITOR_ID", nanoid()) + + bru.setVar("CREDITOR_ACCT_ID", nanoid()) + +} + +script:post-response { + bru.deleteVar("PACS008_CRE_DT_TM") +} + +settings { + encodeUrl: true +} -- cgit v1.2.3