From 7d9d7b028e737d9ba7fa92c856891f13ae94f734 Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Mon, 24 Jun 2024 11:04:14 +0100 Subject: [PATCH 01/39] feat(csi-20): replace hard-coded hub name with input var (#145) feat: replace hard-coded hub name with input var --- .../admin-api-tests/Admintests-20201221.json | 4 +-- .../feature_tests/funds_in/funds_in_ttk.json | 8 ++--- .../Reserve&Abort/funds_out_abort.json | 16 ++++----- .../Reserve&Commit/funds_out_commit.json | 16 ++++----- .../golden_path/settlement_cgs/newsetcgs.json | 4 +-- ...ment-management-primary-currency-test.json | 8 ++--- ...ement-management-second-currency-test.json | 8 ++--- .../mixed_settlement_model.json | 8 ++--- .../provisioning/MojaloopHub_Setup/hub.json | 36 +++++++++---------- .../hub/provisioning_thirdparty/hub.json | 28 +++++++-------- environments/hub.json | 1 + environments/hub_cgs.json | 1 + 12 files changed, 70 insertions(+), 68 deletions(-) diff --git a/collections/hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json b/collections/hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json index 76a8dbde..a36af446 100644 --- a/collections/hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json +++ b/collections/hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json @@ -85,10 +85,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json index 115baa2c..63e45c30 100644 --- a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json +++ b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json @@ -72,10 +72,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -277,10 +277,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json index c2565f6c..40ff3c7b 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json @@ -72,10 +72,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -277,10 +277,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -504,10 +504,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -675,10 +675,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json index 09dd0298..e4252a87 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json @@ -72,10 +72,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -277,10 +277,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -504,10 +504,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -675,10 +675,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/settlement_cgs/newsetcgs.json b/collections/hub/golden_path/settlement_cgs/newsetcgs.json index cd29f807..027ed061 100644 --- a/collections/hub/golden_path/settlement_cgs/newsetcgs.json +++ b/collections/hub/golden_path/settlement_cgs/newsetcgs.json @@ -416,10 +416,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index 6f81bcc6..a3cff400 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -1462,10 +1462,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -5331,10 +5331,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json index 7a6c1456..8b7084c2 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -1462,10 +1462,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -5331,10 +5331,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json index cf3cfe0e..4976383b 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -2138,10 +2138,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -6749,10 +6749,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "get", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { diff --git a/collections/hub/provisioning/MojaloopHub_Setup/hub.json b/collections/hub/provisioning/MojaloopHub_Setup/hub.json index c51af8a9..36e2e2b8 100644 --- a/collections/hub/provisioning/MojaloopHub_Setup/hub.json +++ b/collections/hub/provisioning/MojaloopHub_Setup/hub.json @@ -20,10 +20,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_MULTILATERAL_SETTLEMENT", @@ -62,10 +62,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_RECONCILIATION", @@ -104,10 +104,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -142,10 +142,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -180,10 +180,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -218,10 +218,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_MULTILATERAL_SETTLEMENT", @@ -260,10 +260,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_RECONCILIATION", @@ -302,10 +302,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_MULTILATERAL_SETTLEMENT", @@ -344,10 +344,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_RECONCILIATION", diff --git a/collections/hub/provisioning_thirdparty/hub.json b/collections/hub/provisioning_thirdparty/hub.json index 77573118..9ce165d4 100644 --- a/collections/hub/provisioning_thirdparty/hub.json +++ b/collections/hub/provisioning_thirdparty/hub.json @@ -20,10 +20,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_MULTILATERAL_SETTLEMENT", @@ -62,10 +62,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_RECONCILIATION", @@ -104,10 +104,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -142,10 +142,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -180,10 +180,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/endpoints", - "path": "/participants/Hub/endpoints", + "path": "/participants/{$inputs.HUB_NAME}/endpoints", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { @@ -218,10 +218,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_MULTILATERAL_SETTLEMENT", @@ -260,10 +260,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/Hub/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", "method": "post", "params": { - "name": "Hub" + "name": "{$inputs.HUB_NAME}" }, "body": { "type": "HUB_RECONCILIATION", diff --git a/environments/hub.json b/environments/hub.json index b48fbdb0..b2d26ec3 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -1,5 +1,6 @@ { "inputValues": { + "HUB_NAME": "Hub", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://ml-testing-toolkit-backend:5000", "HOST_ACCOUNT_LOOKUP_ADMIN": "http://account-lookup-service-admin", diff --git a/environments/hub_cgs.json b/environments/hub_cgs.json index 56d550c0..154ac601 100644 --- a/environments/hub_cgs.json +++ b/environments/hub_cgs.json @@ -1,5 +1,6 @@ { "inputValues": { + "HUB_NAME": "Hub", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://$release_name-ml-testing-toolkit-backend:5000", "ENABLE_JWS_SIGNING": true, From aa35fa2211004ba3799b23484105a0d2462e901b Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Thu, 27 Jun 2024 16:34:04 +0100 Subject: [PATCH 02/39] feat: update env vars --- environments/hub.json | 2 +- environments/hub_cgs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environments/hub.json b/environments/hub.json index b2d26ec3..72c8e5d1 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -1,6 +1,6 @@ { "inputValues": { - "HUB_NAME": "Hub", + "HUB_NAME": "switch", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://ml-testing-toolkit-backend:5000", "HOST_ACCOUNT_LOOKUP_ADMIN": "http://account-lookup-service-admin", diff --git a/environments/hub_cgs.json b/environments/hub_cgs.json index 154ac601..916f660d 100644 --- a/environments/hub_cgs.json +++ b/environments/hub_cgs.json @@ -1,6 +1,6 @@ { "inputValues": { - "HUB_NAME": "Hub", + "HUB_NAME": "switch", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://$release_name-ml-testing-toolkit-backend:5000", "ENABLE_JWS_SIGNING": true, From d695fbfd67022a50e592174cf39e87a979bbfd1b Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Thu, 27 Jun 2024 18:42:43 +0100 Subject: [PATCH 03/39] feat: parameterize switch id --- ... FSP-ID in the FSPIOP-Destination header.json | 4 ++-- .../active_and_inactive_participant.json | 4 ++-- ...ctive_and_inactive_participants_accounts.json | 4 ++-- .../feature_tests/block_transfer.json | 8 ++++---- .../transfers/fulfill_commit.json | 4 ++-- .../transfers/fulfill_reject.json | 4 ++-- .../original_transfer_at_committed.json | 2 +- .../feature_tests/funds_in/funds_in_ttk.json | 2 +- .../funds_out/Reserve&Abort/funds_out_abort.json | 4 ++-- .../Reserve&Commit/funds_out_commit.json | 4 ++-- .../golden_path/feature_tests/get_transfers.json | 16 ++++++++-------- .../patch_notifications/patch_notification.json | 4 ++-- ..._notification_positive_testfsp1_testfsp2.json | 4 ++-- .../fulfil-reserved-v1.0.json | 4 ++-- .../payee_abort_v1.1.json | 2 +- .../payee_invalid_fulfillment.json | 2 +- .../payee_invalid_timestamp.json | 2 +- .../payer_transfer_timeout.json | 4 ++-- .../p2p_money_transfer_on_us.json | 2 +- .../bulk-duplicated-transfers.json | 12 ++++++------ .../bulk_transfers/bulk-invalid-timestamp.json | 4 ++-- .../fspiop_protocol_validation.json | 6 +++--- .../bulk_transfers/negative_scenarios.json | 12 ++++++------ .../bulk_transfers/positive_scenarios.json | 10 +++++----- 24 files changed, 62 insertions(+), 62 deletions(-) diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json index 88dc0898..1ab87491 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json @@ -290,7 +290,7 @@ "id": 14, "description": "Payee Notification FSP Source is Switch", "exec": [ - "// expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('switch')" + "// expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -656,7 +656,7 @@ "id": 14, "description": "Payee Notification FSP Source is Switch", "exec": [ - "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('switch')" + "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json index 9b104bc8..2e76719b 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json @@ -176,7 +176,7 @@ "description": "Payer side Callback Header - fspiop-source is switch", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, @@ -355,7 +355,7 @@ "description": "Payer side Callback Header - fspiop-source is switch", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index cbf0989b..ec0786f7 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -213,7 +213,7 @@ "description": "Payer side Callback Header - fspiop-source is switch", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, @@ -391,7 +391,7 @@ "description": "Payer side Callback Header - fspiop-source is switch", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, diff --git a/collections/hub/golden_path/feature_tests/block_transfer.json b/collections/hub/golden_path/feature_tests/block_transfer.json index 03119d5e..7aa94fa8 100644 --- a/collections/hub/golden_path/feature_tests/block_transfer.json +++ b/collections/hub/golden_path/feature_tests/block_transfer.json @@ -457,9 +457,9 @@ }, { "id": 4, - "description": "'fspiop-source' should be 'switch'", + "description": "'fspiop-source' should be '{$inputs.HUB_NAME}'", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch');" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}');" ] }, { @@ -1259,9 +1259,9 @@ }, { "id": 4, - "description": "'fspiop-source' should be 'switch'", + "description": "'fspiop-source' should be '{$inputs.HUB_NAME}'", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch');" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}');" ] }, { diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json index 7e35bf0e..d82010d7 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json @@ -443,7 +443,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, @@ -882,7 +882,7 @@ "id": 3, "description": "Payee Side Callback Header - fspiop-source is switch", "exec": [ - "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('switch')", + "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json index 7d672e32..19768811 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json @@ -439,7 +439,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, @@ -958,7 +958,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json index 508427a3..b6ba623a 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json @@ -738,7 +738,7 @@ "id": 15, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json index 63e45c30..c5a0e5b6 100644 --- a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json +++ b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json @@ -365,7 +365,7 @@ "id": 2, "description": "fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json index 40ff3c7b..8a1e4024 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json @@ -365,7 +365,7 @@ "id": 2, "description": "fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -764,7 +764,7 @@ "id": 2, "description": "fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json index e4252a87..7052355a 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json @@ -365,7 +365,7 @@ "id": 2, "description": "fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -764,7 +764,7 @@ "id": 2, "description": "fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/get_transfers.json b/collections/hub/golden_path/feature_tests/get_transfers.json index db5f899b..900bb14a 100644 --- a/collections/hub/golden_path/feature_tests/get_transfers.json +++ b/collections/hub/golden_path/feature_tests/get_transfers.json @@ -544,9 +544,9 @@ }, { "id": 2, - "description": "Payer FSP: 'fspiop-source' is 'switch'", + "description": "Payer FSP: 'fspiop-source' is $inputs.HUB_NAME", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -658,10 +658,10 @@ }, { "id": 2, - "description": "Payee FSP: 'fspiop-source' is 'switch'", + "description": "Payee FSP: 'fspiop-source' is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, @@ -786,10 +786,10 @@ }, { "id": 2, - "description": "Payee FSP: 'fspiop-source' is 'switch'", + "description": "Payee FSP: 'fspiop-source' is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, @@ -923,9 +923,9 @@ }, { "id": 2, - "description": "Payer FSP: 'fspiop-source' is 'switch'", + "description": "Payer FSP: 'fspiop-source' is $inputs.HUB_NAME", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json index ecac66e7..c347df91 100644 --- a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json +++ b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json @@ -289,7 +289,7 @@ "id": 14, "description": "Payee Notification FSP Source is Switch", "exec": [ - "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('switch')" + "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -620,7 +620,7 @@ "id": 14, "description": "Payee Notification FSP Source is Switch", "exec": [ - "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('switch')" + "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json index 592094be..b3b3b6c6 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json @@ -997,11 +997,11 @@ }, { "id": 74, - "description": "On testfsp1 'fspiop-source' is 'switch'", + "description": "On testfsp1 'fspiop-source' is $inputs.HUB_NAME", "exec": [ "/* Disabled temporarily", "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeSideTransferRequest.headers['fspiop-source']).to.equal('switch')", + " expect(requestVariables.payeeSideTransferRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}", "*/" ] diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json index 1f2e2639..786c86b7 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json @@ -362,7 +362,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, @@ -481,7 +481,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(requestVariables.transferCallback.headers['fspiop-source']).to.equal('switch')", + "expect(requestVariables.transferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index 1a69e07f..3aa317ec 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -436,7 +436,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json index 4c637da0..b8a6e83e 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json @@ -462,7 +462,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json index 2e3ee85a..20963ef4 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json @@ -454,7 +454,7 @@ "id": 12, "description": "Callback Header - fspiop-source is switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')", + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json index d30cf3ff..52e97fa2 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json @@ -155,7 +155,7 @@ "id": 3, "description": "Payer FSP Callback Header - fspiop-source is switch", "exec": [ - "expect(requestVariables.payerCallback.headers['fspiop-source']).to.equal('switch')", + "expect(requestVariables.payerCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, @@ -187,7 +187,7 @@ "id": 7, "description": "Payee FSP Callback Header - fspiop-source is switch", "exec": [ - "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('switch')", + "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" ] }, diff --git a/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json b/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json index 527e57ad..48c49539 100644 --- a/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json +++ b/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json @@ -403,7 +403,7 @@ "if (environment.ON_US_TRANSFERS_ENABLED===true) {", "expect(environment.callbackt.headers['fspiop-source']).to.equal('{$inputs.toFspId}')", "}else{", - " expect(environment.callbackt.headers['fspiop-source']).to.equal('switch')", + " expect(environment.callbackt.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "}" ] }, diff --git a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json index b10194af..0fb58434 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json @@ -92,7 +92,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -164,7 +164,7 @@ "id": 13, "description": "payeefsp callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -236,7 +236,7 @@ "id": 23, "description": "payeefsp request - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -636,7 +636,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -708,7 +708,7 @@ "id": 13, "description": "payeefsp callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -780,7 +780,7 @@ "id": 23, "description": "payeefsp request - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json index a0d848a2..6d21dbb8 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json @@ -357,7 +357,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(requestVariables.bulkTransferCallback.headers['fspiop-source']).to.equal('switch')" + "expect(requestVariables.bulkTransferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -441,7 +441,7 @@ " Accept: `{$inputs.acceptBulkTransfers}`,", " Date: `{$environment.headerDate}`,", " 'FSPIOP-Source': `{$inputs.fromFspId}`,", - " 'FSPIOP-Destination': 'switch'", + " 'FSPIOP-Destination': '{$inputs.HUB_NAME}'", " }", " };", " ", diff --git a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json index 92bfee61..accecc64 100644 --- a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json +++ b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json @@ -92,7 +92,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -164,7 +164,7 @@ "id": 13, "description": "payeefsp callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -236,7 +236,7 @@ "id": 23, "description": "payeefsp request - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json index 1948ae98..70a8abd8 100644 --- a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json @@ -340,7 +340,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -558,7 +558,7 @@ "id": 3, "description": "payer callback fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -632,7 +632,7 @@ "id": 13, "description": "payee callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -702,7 +702,7 @@ "id": 23, "description": "request to payee - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -876,7 +876,7 @@ "id": 3, "description": "Callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -1003,7 +1003,7 @@ "id": 3, "description": "Callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { diff --git a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json index f3f231d6..092e4b0f 100644 --- a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json @@ -92,7 +92,7 @@ "id": 3, "description": "payerfsp callback - fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -164,7 +164,7 @@ "id": 13, "description": "payeefsp callback - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -236,7 +236,7 @@ "id": 23, "description": "payeefsp request - fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -448,7 +448,7 @@ "id": 3, "description": "Callback fspiop-source should be switch", "exec": [ - "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')" + "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { @@ -578,7 +578,7 @@ "id": 3, "description": "Callback fspiop-source should be switch", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('switch')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] }, { From aa0fc13c48917b7989d703cce4b1b1353b8307c0 Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Thu, 27 Jun 2024 19:10:34 +0100 Subject: [PATCH 04/39] feat: parameterize switch id --- .../active_and_inactive_participant.json | 4 ++-- ...ive_and_inactive_participants_accounts.json | 2 +- .../transfers/fulfill_commit.json | 4 ++-- .../transfers/fulfill_reject.json | 4 ++-- .../original_transfer_at_committed.json | 2 +- .../feature_tests/funds_in/funds_in_ttk.json | 2 +- .../Reserve&Abort/funds_out_abort.json | 4 ++-- .../Reserve&Commit/funds_out_commit.json | 4 ++-- .../patch_notification.json | 4 ++-- .../fulfil-reserved-v1.0.json | 4 ++-- .../payee_abort_v1.1.json | 2 +- .../payee_invalid_fulfillment.json | 2 +- .../payee_invalid_timestamp.json | 2 +- .../payer_transfer_timeout.json | 4 ++-- .../bulk-duplicated-transfers.json | 12 ++++++------ .../bulk_transfers/bulk-invalid-timestamp.json | 4 ++-- .../bulk_transfers/bulk-warm-up.json | 12 ++++++------ .../fspiop_protocol_validation.json | 6 +++--- .../bulk_transfers/negative_scenarios.json | 18 +++++++++--------- .../bulk_transfers/positive_scenarios.json | 14 +++++++------- 20 files changed, 55 insertions(+), 55 deletions(-) diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json index 2e76719b..27f889c3 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json @@ -173,7 +173,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is switch", + "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", @@ -352,7 +352,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is switch", + "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index ec0786f7..2fe78b10 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -210,7 +210,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is switch", + "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json index d82010d7..06a4825a 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json @@ -441,7 +441,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -880,7 +880,7 @@ }, { "id": 3, - "description": "Payee Side Callback Header - fspiop-source is switch", + "description": "Payee Side Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json index 19768811..bf8e3c5c 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json @@ -437,7 +437,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -956,7 +956,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json index b6ba623a..55492108 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json @@ -736,7 +736,7 @@ }, { "id": 15, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json index c5a0e5b6..f6f9b97b 100644 --- a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json +++ b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is switch", + "description": "fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json index 8a1e4024..b1d8794b 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is switch", + "description": "fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -762,7 +762,7 @@ }, { "id": 2, - "description": "fspiop-source is switch", + "description": "fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json index 7052355a..ffd51f10 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is switch", + "description": "fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -762,7 +762,7 @@ }, { "id": 2, - "description": "fspiop-source is switch", + "description": "fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json index c347df91..bfe85d8c 100644 --- a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json +++ b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json @@ -287,7 +287,7 @@ }, { "id": 14, - "description": "Payee Notification FSP Source is Switch", + "description": "Payee Notification FSP Source is $inputs.HUB_NAME", "exec": [ "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -618,7 +618,7 @@ }, { "id": 14, - "description": "Payee Notification FSP Source is Switch", + "description": "Payee Notification FSP Source is $inputs.HUB_NAME", "exec": [ "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json index 786c86b7..e08067f0 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json @@ -360,7 +360,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -479,7 +479,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(requestVariables.transferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index 3aa317ec..7365e184 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -434,7 +434,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json index b8a6e83e..2b2e4a89 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json @@ -460,7 +460,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json index 20963ef4..20c9ba42 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json @@ -452,7 +452,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is switch", + "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json index 52e97fa2..a052dd54 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json @@ -153,7 +153,7 @@ }, { "id": 3, - "description": "Payer FSP Callback Header - fspiop-source is switch", + "description": "Payer FSP Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(requestVariables.payerCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -185,7 +185,7 @@ }, { "id": 7, - "description": "Payee FSP Callback Header - fspiop-source is switch", + "description": "Payee FSP Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json index 0fb58434..f2979d02 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be switch", + "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be switch", + "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -634,7 +634,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -706,7 +706,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be switch", + "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -778,7 +778,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be switch", + "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json index 6d21dbb8..0e3a9ead 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json @@ -335,7 +335,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$environment.headerDate}", "FSPIOP-Source": "{$inputs.fromFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -355,7 +355,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(requestVariables.bulkTransferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json b/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json index c17b0a4c..923772e3 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json @@ -139,7 +139,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] @@ -189,7 +189,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "testingtoolkitdfsp", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] @@ -349,7 +349,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] @@ -399,7 +399,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "testingtoolkitdfsp", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] @@ -559,7 +559,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] @@ -609,7 +609,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "testingtoolkitdfsp", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [] diff --git a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json index accecc64..b26b75bd 100644 --- a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json +++ b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be switch", + "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be switch", + "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json index 70a8abd8..96d4c3cb 100644 --- a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json @@ -318,7 +318,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$environment.headerDate}", "FSPIOP-Source": "{$inputs.fromFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -338,7 +338,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be {$inputs.HUB_NAME}", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -556,7 +556,7 @@ }, { "id": 3, - "description": "payer callback fspiop-source should be switch", + "description": "payer callback fspiop-source should be {$inputs.HUB_NAME}", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -630,7 +630,7 @@ }, { "id": 13, - "description": "payee callback - fspiop-source should be switch", + "description": "payee callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -700,7 +700,7 @@ }, { "id": 23, - "description": "request to payee - fspiop-source should be switch", + "description": "request to payee - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -854,7 +854,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -874,7 +874,7 @@ }, { "id": 3, - "description": "Callback - fspiop-source should be switch", + "description": "Callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -981,7 +981,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.fromFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -1001,7 +1001,7 @@ }, { "id": 3, - "description": "Callback - fspiop-source should be switch", + "description": "Callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json index 092e4b0f..2f24de08 100644 --- a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be switch", + "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be switch", + "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be switch", + "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -426,7 +426,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -446,7 +446,7 @@ }, { "id": 3, - "description": "Callback fspiop-source should be switch", + "description": "Callback fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -556,7 +556,7 @@ "Content-Type": "{$inputs.contentBulkTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "testingtoolkitdfsp", - "FSPIOP-Destination": "switch" + "FSPIOP-Destination": "{$inputs.HUB_NAME}" }, "tests": { "assertions": [ @@ -576,7 +576,7 @@ }, { "id": 3, - "description": "Callback fspiop-source should be switch", + "description": "Callback fspiop-source should be $inputs.HUB_NAME", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] From ea9f31c3923abbbf498a889ab8253e9d1ca4b913 Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Fri, 28 Jun 2024 09:38:05 +0100 Subject: [PATCH 05/39] chore: update test --- .../active_and_inactive_participants_accounts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index 2fe78b10..67c42900 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -388,7 +388,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is switch", + "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", From e5c10058cc0338975f271121c8c66f8105eb198a Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Fri, 28 Jun 2024 16:35:20 +0100 Subject: [PATCH 06/39] feat: update test descriptions --- .../active_and_inactive_participant.json | 4 ++-- .../active_and_inactive_participants_accounts.json | 4 ++-- .../duplicate_handling/transfers/fulfill_commit.json | 4 ++-- .../duplicate_handling/transfers/fulfill_reject.json | 4 ++-- .../transfers/original_transfer_at_committed.json | 2 +- .../golden_path/feature_tests/funds_in/funds_in_ttk.json | 2 +- .../funds_out/Reserve&Abort/funds_out_abort.json | 4 ++-- .../funds_out/Reserve&Commit/funds_out_commit.json | 4 ++-- .../hub/golden_path/feature_tests/get_transfers.json | 8 ++++---- .../patch_notifications/patch_notification.json | 4 ++-- .../reserve_notification_positive_testfsp1_testfsp2.json | 2 +- .../transfer_negative_scenarios/fulfil-reserved-v1.0.json | 4 ++-- .../transfer_negative_scenarios/payee_abort_v1.1.json | 2 +- .../payee_invalid_fulfillment.json | 2 +- .../payee_invalid_timestamp.json | 2 +- .../payer_transfer_timeout.json | 4 ++-- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json index 27f889c3..90fabbe7 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json @@ -173,7 +173,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payer side Callback Header - fspiop-source is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", @@ -352,7 +352,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payer side Callback Header - fspiop-source is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index 67c42900..097fc99f 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -210,7 +210,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payer side Callback Header - fspiop-source is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", @@ -388,7 +388,7 @@ }, { "id": 5, - "description": "Payer side Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payer side Callback Header - fspiop-source is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.sim1Callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json index 06a4825a..cd35c32b 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json @@ -441,7 +441,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -880,7 +880,7 @@ }, { "id": 3, - "description": "Payee Side Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payee Side Callback Header - fspiop-source is switch's name", "exec": [ "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json index bf8e3c5c..0b2e1ea3 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json @@ -437,7 +437,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -956,7 +956,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json index 55492108..4c8390aa 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json @@ -736,7 +736,7 @@ }, { "id": 15, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json index f6f9b97b..7f99bf2b 100644 --- a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json +++ b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is $inputs.HUB_NAME", + "description": "fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json index b1d8794b..f65762b0 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is $inputs.HUB_NAME", + "description": "fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -762,7 +762,7 @@ }, { "id": 2, - "description": "fspiop-source is $inputs.HUB_NAME", + "description": "fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json index ffd51f10..ae54c282 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json @@ -363,7 +363,7 @@ }, { "id": 2, - "description": "fspiop-source is $inputs.HUB_NAME", + "description": "fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -762,7 +762,7 @@ }, { "id": 2, - "description": "fspiop-source is $inputs.HUB_NAME", + "description": "fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/get_transfers.json b/collections/hub/golden_path/feature_tests/get_transfers.json index 900bb14a..020b03da 100644 --- a/collections/hub/golden_path/feature_tests/get_transfers.json +++ b/collections/hub/golden_path/feature_tests/get_transfers.json @@ -544,7 +544,7 @@ }, { "id": 2, - "description": "Payer FSP: 'fspiop-source' is $inputs.HUB_NAME", + "description": "Payer FSP: 'fspiop-source' is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -658,7 +658,7 @@ }, { "id": 2, - "description": "Payee FSP: 'fspiop-source' is $inputs.HUB_NAME", + "description": "Payee FSP: 'fspiop-source' is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", @@ -786,7 +786,7 @@ }, { "id": 2, - "description": "Payee FSP: 'fspiop-source' is $inputs.HUB_NAME", + "description": "Payee FSP: 'fspiop-source' is switch's name", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", @@ -923,7 +923,7 @@ }, { "id": 2, - "description": "Payer FSP: 'fspiop-source' is $inputs.HUB_NAME", + "description": "Payer FSP: 'fspiop-source' is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json index bfe85d8c..12eacf47 100644 --- a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json +++ b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json @@ -287,7 +287,7 @@ }, { "id": 14, - "description": "Payee Notification FSP Source is $inputs.HUB_NAME", + "description": "Payee Notification FSP Source is switch's name", "exec": [ "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -618,7 +618,7 @@ }, { "id": 14, - "description": "Payee Notification FSP Source is $inputs.HUB_NAME", + "description": "Payee Notification FSP Source is switch's name", "exec": [ "expect(environment.payeeCallbackNotification.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json index b3b3b6c6..6aa0710d 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json @@ -997,7 +997,7 @@ }, { "id": 74, - "description": "On testfsp1 'fspiop-source' is $inputs.HUB_NAME", + "description": "On testfsp1 'fspiop-source' is switch's name", "exec": [ "/* Disabled temporarily", "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json index e08067f0..0d326062 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json @@ -360,7 +360,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -479,7 +479,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(requestVariables.transferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index 7365e184..fbd5a9b0 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -434,7 +434,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json index 2b2e4a89..b0eb7d0d 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json @@ -460,7 +460,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json index 20c9ba42..768cd5af 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json @@ -452,7 +452,7 @@ }, { "id": 12, - "description": "Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Callback Header - fspiop-source is switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json index a052dd54..a2754ea0 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json @@ -153,7 +153,7 @@ }, { "id": 3, - "description": "Payer FSP Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payer FSP Callback Header - fspiop-source is switch's name", "exec": [ "expect(requestVariables.payerCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" @@ -185,7 +185,7 @@ }, { "id": 7, - "description": "Payee FSP Callback Header - fspiop-source is $inputs.HUB_NAME", + "description": "Payee FSP Callback Header - fspiop-source is switch's name", "exec": [ "expect(requestVariables.payeeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')", "" From ffb27f869a3bbd8914fb33ba58c24724b7374a9d Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Fri, 28 Jun 2024 16:37:52 +0100 Subject: [PATCH 07/39] feat: update test descriptions --- collections/hub/golden_path/feature_tests/block_transfer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collections/hub/golden_path/feature_tests/block_transfer.json b/collections/hub/golden_path/feature_tests/block_transfer.json index 7aa94fa8..e6ebb873 100644 --- a/collections/hub/golden_path/feature_tests/block_transfer.json +++ b/collections/hub/golden_path/feature_tests/block_transfer.json @@ -457,7 +457,7 @@ }, { "id": 4, - "description": "'fspiop-source' should be '{$inputs.HUB_NAME}'", + "description": "'fspiop-source' should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}');" ] @@ -1259,7 +1259,7 @@ }, { "id": 4, - "description": "'fspiop-source' should be '{$inputs.HUB_NAME}'", + "description": "'fspiop-source' should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}');" ] From a50f5f1352c58dcb3e361c26ab1e51cf858a04f0 Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Fri, 28 Jun 2024 16:38:46 +0100 Subject: [PATCH 08/39] feat: update test descriptions --- .../bulk_transfers/bulk-duplicated-transfers.json | 12 ++++++------ .../bulk_transfers/bulk-invalid-timestamp.json | 2 +- .../bulk_transfers/fspiop_protocol_validation.json | 6 +++--- .../bulk_transfers/negative_scenarios.json | 8 ++++---- .../bulk_transfers/positive_scenarios.json | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json index f2979d02..27b363d2 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payerfsp callback - fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp request - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -634,7 +634,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payerfsp callback - fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -706,7 +706,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -778,7 +778,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp request - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json index 0e3a9ead..fb3a4f96 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json @@ -355,7 +355,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payerfsp callback - fspiop-source should be switch's name", "exec": [ "expect(requestVariables.bulkTransferCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json index b26b75bd..6d8ecb8c 100644 --- a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json +++ b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payerfsp callback - fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp request - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json index 96d4c3cb..c2ee11f8 100644 --- a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json @@ -630,7 +630,7 @@ }, { "id": 13, - "description": "payee callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payee callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -700,7 +700,7 @@ }, { "id": 23, - "description": "request to payee - fspiop-source should be $inputs.HUB_NAME", + "description": "request to payee - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -874,7 +874,7 @@ }, { "id": 3, - "description": "Callback - fspiop-source should be $inputs.HUB_NAME", + "description": "Callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -1001,7 +1001,7 @@ }, { "id": 3, - "description": "Callback - fspiop-source should be $inputs.HUB_NAME", + "description": "Callback - fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] diff --git a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json index 2f24de08..ecbf1581 100644 --- a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json @@ -90,7 +90,7 @@ }, { "id": 3, - "description": "payerfsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payerfsp callback - fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -162,7 +162,7 @@ }, { "id": 13, - "description": "payeefsp callback - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp callback - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -234,7 +234,7 @@ }, { "id": 23, - "description": "payeefsp request - fspiop-source should be $inputs.HUB_NAME", + "description": "payeefsp request - fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -446,7 +446,7 @@ }, { "id": 3, - "description": "Callback fspiop-source should be $inputs.HUB_NAME", + "description": "Callback fspiop-source should be switch's name", "exec": [ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] @@ -576,7 +576,7 @@ }, { "id": 3, - "description": "Callback fspiop-source should be $inputs.HUB_NAME", + "description": "Callback fspiop-source should be switch's name", "exec": [ "expect(callback.headers['fspiop-source']).to.equal('{$inputs.HUB_NAME}')" ] From 6663c1a74cd1fbe4bbc42c3dde17cf205ae5e0ef Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Fri, 28 Jun 2024 16:48:48 +0100 Subject: [PATCH 09/39] feat: update default switch name --- environments/hub.json | 2 +- environments/hub_cgs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environments/hub.json b/environments/hub.json index 72c8e5d1..b2d26ec3 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -1,6 +1,6 @@ { "inputValues": { - "HUB_NAME": "switch", + "HUB_NAME": "Hub", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://ml-testing-toolkit-backend:5000", "HOST_ACCOUNT_LOOKUP_ADMIN": "http://account-lookup-service-admin", diff --git a/environments/hub_cgs.json b/environments/hub_cgs.json index 916f660d..154ac601 100644 --- a/environments/hub_cgs.json +++ b/environments/hub_cgs.json @@ -1,6 +1,6 @@ { "inputValues": { - "HUB_NAME": "switch", + "HUB_NAME": "Hub", "BASE_CENTRAL_LEDGER_ADMIN": "", "CALLBACK_ENDPOINT_BASE_URL": "http://$release_name-ml-testing-toolkit-backend:5000", "ENABLE_JWS_SIGNING": true, From cd755d28254898d91371c40db053a66d29c0eee6 Mon Sep 17 00:00:00 2001 From: Sridevi Miriyala <38143240+sri-miriyala@users.noreply.github.com> Date: Tue, 2 Jul 2024 07:16:10 -0400 Subject: [PATCH 10/39] Feat/#3910 fxp golden path (#150) * Initial check in for FXP Golden Path * Added more test cases for fxp golden path * Updates for negative test cases * Initial version for Settlement tests * Added new test cases for duplicate handling * Added tests for checking positions * refactoring folder structure to align with golden path structure * renamed folder structure * changed folder name * Updates for timeout scenarios * Updates for negative scenarios * updated getParties response to testpayee * Added a readme * feat(mojaloop/#3984): parameterize switch id (#149) * Remove testcases doc * Added rule for fxp ABORTED state --------- Co-authored-by: Steven Oderayi --- .../fx_golden_path/api_tests/fx_quotes.json | 77 + .../api_tests/fx_transfers.json | 83 + .../duplicate_handling/duplicate_test.json | 877 ++++++++ .../feature_tests/happy_path/fx_tests.json | 1014 +++++++++ .../happy_path/get_fx_transfers.json | 755 +++++++ .../negative_scenarios/fxp_error.json | 1996 +++++++++++++++++ .../fxp_non_success_states.json | 754 +++++++ .../fxp_payee_invalid_fulfillment.json | 660 ++++++ .../fxp_quote_validity_expired.json | 1429 ++++++++++++ .../negative_scenarios/timeout_scenarios.json | 1625 ++++++++++++++ .../settlement/settlement_tests.json | 1397 ++++++++++++ .../happy_path}/sdk_fx_transfer.json | 0 .../negative_scenarios/fxp_error.json | 300 +++ .../fxp_non_success_states.json | 189 ++ .../fxp_timeout_scenarios.json | 477 ++++ rules/pm4ml/fxp_response_rules.json | 1338 ++++++----- 16 files changed, 12446 insertions(+), 525 deletions(-) create mode 100644 collections/hub/fx_golden_path/api_tests/fx_quotes.json create mode 100644 collections/hub/fx_golden_path/api_tests/fx_transfers.json create mode 100644 collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json create mode 100644 collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json create mode 100644 collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json create mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json create mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json create mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json create mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json create mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json create mode 100644 collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json rename collections/pm4ml/{fxp2p => fx_golden_path/feature_tests/happy_path}/sdk_fx_transfer.json (100%) create mode 100644 collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json create mode 100644 collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json create mode 100644 collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json diff --git a/collections/hub/fx_golden_path/api_tests/fx_quotes.json b/collections/hub/fx_golden_path/api_tests/fx_quotes.json new file mode 100644 index 00000000..9c578a09 --- /dev/null +++ b/collections/hub/fx_golden_path/api_tests/fx_quotes.json @@ -0,0 +1,77 @@ +{ + "options": {}, + "name": "fx_quotes", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - 400", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Quote - 400" + }, + "requests": [ + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SENDING", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + } + ] + } + ] + } + \ No newline at end of file diff --git a/collections/hub/fx_golden_path/api_tests/fx_transfers.json b/collections/hub/fx_golden_path/api_tests/fx_transfers.json new file mode 100644 index 00000000..36464923 --- /dev/null +++ b/collections/hub/fx_golden_path/api_tests/fx_transfers.json @@ -0,0 +1,83 @@ +{ + "options": {}, + "name": "fx_transfer_400", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer - 400", + "fileInfo": { + "path": "collections/tests/fx/fx_transfers.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer - 400" + }, + "requests": [ + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "X@#^", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "condition", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json b/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json new file mode 100644 index 00000000..8750a37e --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json @@ -0,0 +1,877 @@ +{ + "options": {}, + "name": "collections_tests_fx_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer", + "fileInfo": { + "path": "collections/tests/fx/duplicate_test.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 7, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 8, + "description": "Capture FXP position before duplicate fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before Duplicate FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before Duplicate FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "Check FXP position after duplicate fxTransfer. It should be same as before duplicate fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Duplicate FxTransfer=${environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after Duplicate FxTransfer=${environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer}`);" + ] + } + }, + "tests" :{ + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer)", + "", + "expect(environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer)" + ] + } + ] + } + } + ] + } + ] +} diff --git a/collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json b/collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json new file mode 100644 index 00000000..9f340932 --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json @@ -0,0 +1,1014 @@ +{ + "options": {}, + "name": "collections_tests_fx_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 7, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 14, + "description": "Get Accounts for Payer AFTER fx transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + }, + "tests" :{ + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + } + }, + { + "id": 16, + "description": "Get Accounts for FXP AFTER fx transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 2, + "description": "Payee position should be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" + ] + }, + { + "id": 3, + "description": "FXP Source currency position should be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 4, + "description": "FXP Target currency position should be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + ] + } + } + }, + { + "id": 7, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 16, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 2, + "description": "Payee position should be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" + ] + }, + { + "id": 3, + "description": "FXP Source currency position should be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 4, + "description": "FXP Target currency position should be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + ] + } + } + }, + { + "id": 15, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests" :{ + "assertions": [ + { + "id": 1, + "description": "FXP position should not be changed", + "exec": [ + "expect(environment.fxpPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + } + ] + } + ] +} diff --git a/collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json b/collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json new file mode 100644 index 00000000..4a130644 --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json @@ -0,0 +1,755 @@ +{ + "options": {}, + "name": "collections_tests_fx_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 7, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 8, + "description": "GET /fxTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.4.callback.body.conversionTerms.conversionId}", + "method": "get", + "params": { + "ID": "{$prev.4.callback.body.conversionTerms.conversionId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + ] +} diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json new file mode 100644 index 00000000..5fdb6791 --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json @@ -0,0 +1,1996 @@ +{ + "options": {}, + "name": "fxp_error", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - Error scenario", + "fileInfo": { + "path": "collections/tests/fx/golden_path/feature_tests/fxp_error.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 3, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 4, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}", + "extensionList": { + "extension": [ + { + "key": "502", + "value": "trigger error for fxQuotes" + } + ] + } + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain errorInformation code", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback body should contain errorInformation description", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$prev.4.request.body.conversionTerms.conversionId}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - Error Scenario", + "fileInfo": { + "path": "collections/tests/fx/fx_error.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 7, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "1001" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for fxTransfers" + } + ] + } + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain errorInformation code", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback body should contain errorInformation description", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + }, + { + "id": 3, + "name": "Fx Transfer - success; Regular Transfer - error", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /transfers returns PUT /transfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYERDFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYERDFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEEDFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEEDFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 3, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 7, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for fxTransfers" + } + ] + } + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 13, + "description": "POST /transfer that triggers an error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.9.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "1001" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback should have error code", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback should have error description", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 6, + "description": "Get Accounts for Payer AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYERDFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYERDFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + }, + "tests" :{ + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + } + }, + { + "id": 7, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEEDFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEEDFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests" :{ + "assertions": [ + { + "id": 1, + "description": "FXP position should not be changed", + "exec": [ + "expect(environment.fxpPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP Source currency position should be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 2, + "description": "FXP Target currency position should be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + ] + } + } + } + ] + } + ] + } + \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json new file mode 100644 index 00000000..e86d88e2 --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json @@ -0,0 +1,754 @@ +{ + "options": {}, + "name": "fxp_non_success_states", + "test_cases": [ + { + "id": 1, + "name": "Check ABORTED state in PUT /fxTransfers/{ID}", + "fileInfo": { + "path": "collections/tests/fx/golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID} with ABORTED state" + }, + "requests": [ + { + "id": 1, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 2, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 3, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.1.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.1.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.1.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.FXP_SOURCE_AMOUNT}", + "currency": "{$inputs.FXP_SOURCE_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 5, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.2.request.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "1002" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.3.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "Get Accounts for Payer AFTER fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after FxTransfer=${environment.payerPositionBalanceAfterFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for Payee AFTER fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Position should not be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterFxTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after FxTransfer=${environment.payeePositionBalanceAfterFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 12, + "description": "Get Accounts for FXP AFTER fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Position of the source currency should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + ] + }, + { + "id": 2, + "description": "Position of the target currency should not be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after FxTransfer=${environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after FxTransfer=${environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer}`);", + "", + "" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json new file mode 100644 index 00000000..d1e44e4d --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json @@ -0,0 +1,660 @@ +{ + "options": {}, + "name": "fxp_payee_invalid_fulfillment", + "test_cases": [ + { + "id": 1, + "name": "Check that positions for FXP, Payer and Payee are not changed after FXTransfer fails with invalid fulfillment", + "fileInfo": { + "path": "collections/tests/fx/golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /transfers returns PUT /transfers/{ID} with invalid fulfillment" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 7, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + + ] + } + \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json new file mode 100644 index 00000000..46e9cf83 --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json @@ -0,0 +1,1429 @@ +{ + "options": {}, + "name": "fxp_quote_expired", + "test_cases": [ + { + "id": 1, + "name": "Send POST /quotes after expiry of the fxQuote", + "fileInfo": { + "path": "collections/tests/fx/golden_path/feature_tests/fxp_error.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 3, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 4, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 2, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for fxQuotes" + } + ] + } + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 9, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + }, + { + "id": 10, + "description": "Callback body should contain expiration", + "exec": [ + "expect(callback.body.conversionTerms.expiration).to.equal('{$request.body.conversionTerms.expiration}')" + ] + + } + ] + } + }, + { + "id": 5, + "description": "Send POST /quotes after expiration in PUT /fxQuotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "await custom.sleep(maxRetryWait)" + ] + } + } + } + ] + }, + { + "id": 2, + "name": "Send POST /fxTransfers after expiry of the fxQuote", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 2, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 3, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for fxTransfers" + } + ] + } + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain errorInformation code", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback body should contain errorInformation description", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + }, + { + "id": 3, + "name": "FX Transfer - error", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /transfers returns PUT /transfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 2, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 3, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 5, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for transfers" + } + ] + } + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain errorInformation code", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback body should contain errorInformation description", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 5, + "description": "Check position for FXP. It should be same as before the transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/participants/{name}/positions", + "path": "/participants/{$inputs.payeefsp}/positions", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}", + "extensionList": { + "extension": [ + { + "key": "error", + "value": "trigger error for transfers" + } + ] + } + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain errorInformation code", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback body should contain errorInformation description", + "exec": [ + "expect(response.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + ] + } + \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json new file mode 100644 index 00000000..4a9a221f --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json @@ -0,0 +1,1625 @@ +{ + "options": {}, + "name": "timeout_scenarios", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - timeout scenario for FXP Quotes", + "fileInfo": { + "path": "collections/tests/fx/timeout_scenarios.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Quotes - timeout scenario" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}", + "extensionList" : { + "extension" : [ + { + "key": "2002", + "value": "FXP_QUOTES_TIMEOUT" + } + ] + } + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - timeout scenario for EXPIRED_PREPARED", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer - timeout scenario" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 7, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "1000" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP AFTER fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 2, + "description": "Payee position should be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" + ] + }, + { + "id": 3, + "description": "FXP Source currency position should be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + ] + }, + { + "id": 4, + "description": "FXP Target currency position should be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer}`);", + "", + "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer}`);", + "", + "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + ] + } + } + } + ] + }, + { + "id": 3, + "name": "FX Transfer - timeout scenario for RESERVED_TIMEOUT", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer - timeout scenario" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 6, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 7, + "description": "GET /fxTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.4.callback.body.conversionTerms.conversionId}", + "method": "get", + "params": { + "ID": "{$prev.4.callback.body.conversionTerms.conversionId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED_TIMEOUT", + "exec": [ + "expect(callback.body.transferState).to.equal('RESERVED_TIMEOUT')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + ] + } + \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json b/collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json new file mode 100644 index 00000000..c67c165d --- /dev/null +++ b/collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json @@ -0,0 +1,1397 @@ +{ + "options": {}, + "name": "collections_tests_fx_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer", + "fileInfo": { + "path": "collections/tests/fx/fx_tests.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer" + }, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "body": { + "fspId": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 2, + "description": "Get party info Copy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.toIdValue}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.accept}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" + ] + } + ] + } + }, + { + "id": 3, + "description": "GET /services/FXP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "prefix": "/v2", + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/services/FXP", + "path": "/services/FXP", + "method": "get", + "url": "{$inputs.HOST_FXP_SERVICES}", + "disabled": false, + "headers": { + "Content-Type": "{$inputs.contentTypeServicesFxp}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptServicesFxp}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain providers", + "exec": [ + "expect(callback.body).to.have.property('providers')", + "expect(callback.body.providers.length).to.be.at.least(1)" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FXP_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.fromFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.FXP_TARGET_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 7, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FXP_SOURCE_CURRENCY}", + "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.FXP_TARGET_AMOUNT}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 8, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.6.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 9, + "description": "Get Accounts for FXP AFTER Transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);" + ] + } + } + }, + { + "id": 10, + "name": "Create Settlement on the current open window", + "meta": { + "info": "Get current open window and close it" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Get Existing Open Window" + }, + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "Close existent window" + }, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" + ] + }, + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } + } + }, + { + "id": 3, + "meta": { + "info": "Create Settlement for Closed Window" + }, + "description": "Create Settlement for Closed Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "expect(response.body.settlementWindows.length).to.equal(1)" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "DEFERREDNET{$inputs.currency}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$environment.closedWindowID}" + } + ] + }, + "delay": "3000", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "environment.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", + "labels": [ + "settlements" + ] + } + }, + { + "id": 10, + "name": "Prepare-settlement", + "meta": { + "info": "Prepare-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "Prepare Settlement" + }, + "description": "Prepare Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", + "labels": [ + "settlements" + ] + } + }, + { + "id": 11, + "name": "reserve-settlement", + "meta": { + "info": "reserve-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "reserve Settlement" + }, + "description": "reserve Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "check state for participants after prepare" + }, + "description": "check state for participants after prepare", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RESERVED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", + "labels": [ + "settlements" + ] + } + }, + { + "id": 12, + "name": "commit-settlement", + "meta": { + "info": "commit-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "commit Settlement" + }, + "description": "commit Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", + "labels": [ + "settlements" + ] + } + }, + { + "id": 13, + "name": "settle-settlement", + "meta": { + "info": "settle-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "settle Settlement" + }, + "description": "settle Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", + "labels": [ + "settlements" + ] + } + }, + { + "id": 14, + "description": "Get Accounts for FXP AFTER Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FXP_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterSettlement= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterSettlement= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Settlement=${environment.fxpSourceCurrencyPositionBalanceAfterSettlement}`);", + "", + "console.log(`FXP Target Currency Position Balance after Settlement=${environment.fxpTargetCurrencyPositionBalanceAfterSettlement}`);" + ] + } + } + } + ] + } + ] +} diff --git a/collections/pm4ml/fxp2p/sdk_fx_transfer.json b/collections/pm4ml/fx_golden_path/feature_tests/happy_path/sdk_fx_transfer.json similarity index 100% rename from collections/pm4ml/fxp2p/sdk_fx_transfer.json rename to collections/pm4ml/fx_golden_path/feature_tests/happy_path/sdk_fx_transfer.json diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json new file mode 100644 index 00000000..cfc824d8 --- /dev/null +++ b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json @@ -0,0 +1,300 @@ +{ + "options": {}, + "name": "fxp_error", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - Error scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "501", + "quoteRequestExtensions" : [ + { + "key": "501", + "value": "Trigger Quote Error" + } + ] + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_CONVERSION_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - Error Scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "502" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Quotes Response contains error", + "exec": [ + "expect(response.body.fxQuoteResponse).contains('error code')" + ] + } + ] + } + }, + { + "id": 3, + "description": "Accept Conversion", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptConversion": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Accept Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptQuote": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be COMPLETED", + "exec": [ + "expect(response.body.currentState).to.equal('COMPLETED')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json new file mode 100644 index 00000000..66851c74 --- /dev/null +++ b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json @@ -0,0 +1,189 @@ +{ + "options": {}, + "name": "fxp_non_success_states", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer - ABORTED Scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxTransfers sends ABORTED state" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "506" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_CONVERSION_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 3, + "description": "Accept Conversion", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptConversion": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Accept Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptQuote": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be COMPLETED", + "exec": [ + "expect(response.body.currentState).to.equal('COMPLETED')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json new file mode 100644 index 00000000..72a61d9b --- /dev/null +++ b/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json @@ -0,0 +1,477 @@ +{ + "options": {}, + "name": "fxp_error", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - Timeout scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxQuotes timesout sending a response. Switch should send PUT /fxQuotes/{ID}/error without Timeout error code" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "503" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 500", + "exec": [ + "expect(response.status).to.equal(500)" + ] + }, + { + "id": 2, + "description": "Check for /error response with timeout information", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - Timeout Scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxTransfers times out" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "504" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_CONVERSION_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 3, + "description": "Accept Conversion", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptConversion": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Accept Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptQuote": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be COMPLETED", + "exec": [ + "expect(response.body.currentState).to.equal('COMPLETED')" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "FX - Regular Transfer - Timeout Scenario", + "fileInfo": { + "path": "pm4ml/sdk_fx_transfer.json" + }, + "meta": { + "info": "POST /fxTransfers works fine, but POST /transfers times out" + }, + "requests": [ + { + "id": 1, + "description": "Initiate a transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": null, + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "merchantClassificationCode": "123", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}" + }, + "amountType": "SEND", + "transactionType": "TRANSFER", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "505" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_CONVERSION_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 3, + "description": "Accept Conversion", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptConversion": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Accept Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "url": null, + "body": { + "acceptQuote": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be COMPLETED", + "exec": [ + "expect(response.body.currentState).to.equal('COMPLETED')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/rules/pm4ml/fxp_response_rules.json b/rules/pm4ml/fxp_response_rules.json index 14a3a8af..1e2d6693 100644 --- a/rules/pm4ml/fxp_response_rules.json +++ b/rules/pm4ml/fxp_response_rules.json @@ -1,547 +1,835 @@ [ - { - "ruleId": 6, - "priority": 1, - "description": "FXP - post /fxQuotes", - "apiVersion": { - "asynchronous": false, - "majorVersion": 2, - "minorVersion": 1, - "type": "mojaloop_connector_outbound" - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxQuotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] + { + "ruleId": 12, + "priority": 1, + "description": "FXP - Generic error for post /fxQuotes", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false, + "specFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_connector_backend_2.1/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "501", + "path": "conversionTerms.sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "5001", + "message": "Generic Error" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } }, - "event": { - "method": null, - "params": { - "body": { - "conversionTerms": { - "amountType": "SEND", - "conversionId": "{$request.body.conversionTerms.conversionId}", - "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", - "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", - "expiration": "{$request.body.conversionTerms.expiration}", - "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", - "sourceAmount": { - "currency": "{$request.body.conversionTerms.sourceAmount.currency}" - }, - "targetAmount": { - "currency": "{$request.body.conversionTerms.targetAmount.currency}" - } + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 14, + "priority": 1, + "description": "FXP - Timeout scenario for post /fxQuotes", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false, + "specFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_connector_backend_2.1/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "503", + "path": "conversionTerms.sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "conversionTerms": { + "amountType": "SEND", + "conversionId": "{$request.body.conversionTerms.conversionId}", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "expiration": "{$request.body.conversionTerms.expiration}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}" }, - "homeTransactionId": "homeTransactionId-123" + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}" + } }, - "statusCode": "200", - "scripts": { - "exec": [ - "const fxQuoteBody = JSON.parse(request.body)", - "const fxRates = {", - " \"base\": \"USD\",", - " \"date\": \"2023-03-03\",", - " \"rates\": {", - " \"AED\": 3.670595,", - " \"AFN\": 88.881425,", - " \"ALL\": 108.376523,", - " \"AMD\": 390.471399,", - " \"ANG\": 1.804308,", - " \"AOA\": 505.839998,", - " \"ARS\": 197.689779,", - " \"AUD\": 1.48222,", - " \"AWG\": 1.799566,", - " \"AZN\": 1.699337,", - " \"BAM\": 1.842544,", - " \"BBD\": 1.998973,", - " \"BDT\": 107.07517,", - " \"BGN\": 1.843505,", - " \"BHD\": 0.376919,", - " \"BIF\": 2079.526363,", - " \"BMD\": 0.999953,", - " \"BND\": 1.34899,", - " \"BOB\": 6.915241,", - " \"BRL\": 5.198354,", - " \"BSD\": 0.999335,", - " \"BTC\": 0.000044,", - " \"BTN\": 82.647688,", - " \"BWP\": 13.237335,", - " \"BYN\": 2.526074,", - " \"BZD\": 2.01736,", - " \"CAD\": 1.357836,", - " \"CDF\": 2086.44176,", - " \"CHF\": 0.940605,", - " \"CLF\": 0.02963,", - " \"CLP\": 812.200511,", - " \"CNH\": 6.904663,", - " \"CNY\": 6.898567,", - " \"COP\": 4833.056834,", - " \"CRC\": 558.748547,", - " \"CUC\": 0.99935,", - " \"CUP\": 25.728404,", - " \"CVE\": 103.850722,", - " \"CZK\": 22.089353,", - " \"DJF\": 178.175863,", - " \"DKK\": 7.009313,", - " \"DOP\": 55.539156,", - " \"DZD\": 136.526375,", - " \"EGP\": 30.743014,", - " \"ERN\": 14.987908,", - " \"ETB\": 53.840023,", - " \"EUR\": 0.942228,", - " \"FJD\": 2.210902,", - " \"FKP\": 0.83471,", - " \"GBP\": 0.834759,", - " \"GEL\": 2.598071,", - " \"GGP\": 0.834647,", - " \"GHS\": 12.759418,", - " \"GIP\": 0.834672,", - " \"GMD\": 60.98912,", - " \"GNF\": 8615.060299,", - " \"GTQ\": 7.816555,", - " \"GYD\": 211.148725,", - " \"HKD\": 7.843114,", - " \"HNL\": 24.676398,", - " \"HRK\": 7.096534,", - " \"HTG\": 151.107107,", - " \"HUF\": 354.546511,", - " \"IDR\": 15305.816425,", - " \"ILS\": 3.659591,", - " \"IMP\": 0.83482,", - " \"INR\": 82.271752,", - " \"IQD\": 1460.523392,", - " \"IRR\": 42214.667089,", - " \"ISK\": 142.311052,", - " \"JEP\": 0.83532,", - " \"JMD\": 154.109032,", - " \"JOD\": 0.709871,", - " \"JPY\": 136.579884,", - " \"KES\": 127.794041,", - " \"KGS\": 87.345932,", - " \"KHR\": 4067.915978,", - " \"KMF\": 464.562389,", - " \"KPW\": 899.247674,", - " \"KRW\": 1302.190934,", - " \"KWD\": 0.307326,", - " \"KYD\": 0.83405,", - " \"KZT\": 436.101643,", - " \"LAK\": 16873.790213,", - " \"LBP\": 15020.521133,", - " \"LKR\": 345.92388,", - " \"LRD\": 159.117366,", - " \"LSL\": 18.20456,", - " \"LYD\": 4.835853,", - " \"MAD\": 10.388795,", - " \"MDL\": 18.888917,", - " \"MGA\": 4296.352625,", - " \"MKD\": 58.02969,", - " \"MMK\": 2101.470623,", - " \"MNT\": 3404.116439,", - " \"MOP\": 8.091167,", - " \"MRU\": 36.386096,", - " \"MUR\": 46.641155,", - " \"MVR\": 15.347871,", - " \"MWK\": 1027.828846,", - " \"MXN\": 18.098725,", - " \"MYR\": 4.474645,", - " \"MZN\": 63.797698,", - " \"NAD\": 18.214751,", - " \"NGN\": 460.317636,", - " \"NIO\": 36.600644,", - " \"NOK\": 10.424506,", - " \"NPR\": 132.235448,", - " \"NZD\": 1.604879,", - " \"OMR\": 0.385743,", - " \"PAB\": 0.999902,", - " \"PEN\": 3.770718,", - " \"PGK\": 3.527422,", - " \"PHP\": 54.844041,", - " \"PKR\": 278.695386,", - " \"PLN\": 4.423791,", - " \"PYG\": 7220.315472,", - " \"QAR\": 3.651532,", - " \"RON\": 4.637626,", - " \"RSD\": 110.496314,", - " \"RUB\": 75.238572,", - " \"RWF\": 1091.764956,", - " \"SAR\": 3.750399,", - " \"SBD\": 8.239938,", - " \"SCR\": 13.476738,", - " \"SDG\": 590.506115,", - " \"SEK\": 10.481266,", - " \"SGD\": 1.346505,", - " \"SHP\": 0.834776,", - " \"SLL\": 17650.226858,", - " \"SOS\": 568.863447,", - " \"SRD\": 33.904806,", - " \"SSP\": 130.15096,", - " \"STD\": 22804.902808,", - " \"STN\": 23.075404,", - " \"SVC\": 8.756667,", - " \"SYP\": 2510.429835,", - " \"SZL\": 18.20316,", - " \"THB\": 34.771491,", - " \"TJS\": 10.006042,", - " \"TMT\": 3.507758,", - " \"TND\": 3.129616,", - " \"TOP\": 2.355679,", - " \"TRY\": 18.879408,", - " \"TTD\": 6.789468,", - " \"TWD\": 30.624624,", - " \"TZS\": 2330.0501,", - " \"UAH\": 36.958426,", - " \"UGX\": 3718.628848,", - " \"USD\": 1,", - " \"UYU\": 38.884596,", - " \"UZS\": 11371.806807,", - " \"VES\": 24.306068,", - " \"VND\": 23702.143038,", - " \"VUV\": 117.94585,", - " \"WST\": 2.695482,", - " \"XAF\": 617.756757,", - " \"XAG\": 0.047556,", - " \"XAU\": 0.0011,", - " \"XCD\": 2.700451,", - " \"XDR\": 0.751352,", - " \"XOF\": 617.756728,", - " \"XPD\": 0.001709,", - " \"XPF\": 112.382643,", - " \"XPT\": 0.001221,", - " \"YER\": 250.041827,", - " \"ZAR\": 18.172541,", - " \"ZMW\": 19.989716,", - " \"ZWL\": 321.731101", - " }", - "}", - "", - "const sourceCurrency = fxQuoteBody.conversionTerms.sourceAmount?.currency", - "const targetCurrency = fxQuoteBody.conversionTerms.targetAmount?.currency", - "let conversionRate = 1", - "", - "if(sourceCurrency === fxRates.base) {", - " conversionRate = fxRates.rates[targetCurrency]", - "} else {", - " const invertConvRate1 = fxRates.rates[sourceCurrency]", - " const baseConvRate = fxRates.rates[targetCurrency]", - " conversionRate = (baseConvRate / invertConvRate1)", - "}", - "", - "const sourceAmount = fxQuoteBody.conversionTerms.sourceAmount.amount", - "const targetAmount = fxQuoteBody.conversionTerms.targetAmount.amount", - "", - "let newSourceAmount = sourceAmount", - "let newTargetAmount = targetAmount", - "", - "if (!sourceAmount) {", - " newSourceAmount = Math.round(targetAmount / conversionRate)", - "}", - "", - "if (!targetAmount) {", - " newTargetAmount = Math.round(sourceAmount * conversionRate)", - "}", - "", - "const chargesPercent = 2", - "const chargesSourceAmount = Math.round(newSourceAmount * chargesPercent) / 100", - "const chargesTargetAmount = Math.round(newTargetAmount * chargesPercent) / 100", - "", - "custom.appendEventBody({", - " conversionTerms: {", - " sourceAmount: {", - " amount: newSourceAmount + \"\"", - " },", - " targetAmount: {", - " amount: newTargetAmount + \"\"", - " },", - " charges: [", - " {", - " chargeType: \"currency conversion\",", - " sourceAmount: {", - " amount: chargesSourceAmount + \"\",", - " currency: sourceCurrency", - " },", - " targetAmount: {", - " amount: chargesTargetAmount + \"\",", - " currency: targetCurrency", - " }", - " }", - " ]", - " }", - "})" - ], - "scriptingEngine": "javascript" - } + "homeTransactionId": "homeTransactionId-123" }, - "path": null, - "type": "FIXED_RESPONSE" - }, - "type": "response", - "version": 1 - }, - { - "ruleId": 7, - "priority": 1, - "description": "FXP - post /fxTransfers response", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 2, - "type": "mojaloop_connector_outbound", - "asynchronous": false - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxTransfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": null, - "path": null, - "params": { - "body": { - "homeTransactionId": "{$request.body.homeTransactionId}", - "completedTimestamp": "{$environment.completedTimestamp}", - "conversionState": "RESERVED" - }, - "statusCode": "200", - "scripts": { - "exec": [ - "environment.completedTimestamp = new Date().toISOString()" - ], - "scriptingEngine": "javascript" - } + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" }, - "type": "FIXED_RESPONSE" + "delay": 300000 }, - "type": "response", - "version": 1 - }, - { - "ruleId": 8, - "priority": 1, - "description": "get /parties/{idType}/{idValue}", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 2, - "type": "mojaloop_connector_outbound", - "asynchronous": false - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/parties/{idType}/{idValue}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": null, - "path": null, - "params": { - "body": { - "dateOfBirth": "1966-06-16", - "displayName": "Yaro", - "firstName": "Yaro", - "fspId": "testpayee", - "idType": "MSISDN", - "idValue": "{$request.params.idValue}", - "lastName": "Smith", - "merchantClassificationCode": "1234", - "middleName": "", - "kycInformation": "This is encrypted KYC information" + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 6, + "priority": 1, + "description": "FXP - post /fxQuotes", + "apiVersion": { + "asynchronous": false, + "majorVersion": 2, + "minorVersion": 1, + "type": "mojaloop_connector_outbound" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "params": { + "body": { + "conversionTerms": { + "amountType": "SEND", + "conversionId": "{$request.body.conversionTerms.conversionId}", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "expiration": "{$request.body.conversionTerms.expiration}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}" + } }, - "statusCode": "200", - "scripts": { - "scriptingEngine": "postman" - } + "homeTransactionId": "homeTransactionId-123" }, - "type": "FIXED_RESPONSE" - }, - "type": "response", - "version": 1 - }, - { - "ruleId": 9, - "priority": 1, - "description": "post /quoterequests", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 2, - "type": "mojaloop_connector_backend", - "asynchronous": false + "statusCode": "200", + "scripts": { + "exec": [ + "const fxQuoteBody = JSON.parse(request.body)", + "const fxRates = {", + " \"base\": \"USD\",", + " \"date\": \"2023-03-03\",", + " \"rates\": {", + " \"AED\": 3.670595,", + " \"AFN\": 88.881425,", + " \"ALL\": 108.376523,", + " \"AMD\": 390.471399,", + " \"ANG\": 1.804308,", + " \"AOA\": 505.839998,", + " \"ARS\": 197.689779,", + " \"AUD\": 1.48222,", + " \"AWG\": 1.799566,", + " \"AZN\": 1.699337,", + " \"BAM\": 1.842544,", + " \"BBD\": 1.998973,", + " \"BDT\": 107.07517,", + " \"BGN\": 1.843505,", + " \"BHD\": 0.376919,", + " \"BIF\": 2079.526363,", + " \"BMD\": 0.999953,", + " \"BND\": 1.34899,", + " \"BOB\": 6.915241,", + " \"BRL\": 5.198354,", + " \"BSD\": 0.999335,", + " \"BTC\": 0.000044,", + " \"BTN\": 82.647688,", + " \"BWP\": 13.237335,", + " \"BYN\": 2.526074,", + " \"BZD\": 2.01736,", + " \"CAD\": 1.357836,", + " \"CDF\": 2086.44176,", + " \"CHF\": 0.940605,", + " \"CLF\": 0.02963,", + " \"CLP\": 812.200511,", + " \"CNH\": 6.904663,", + " \"CNY\": 6.898567,", + " \"COP\": 4833.056834,", + " \"CRC\": 558.748547,", + " \"CUC\": 0.99935,", + " \"CUP\": 25.728404,", + " \"CVE\": 103.850722,", + " \"CZK\": 22.089353,", + " \"DJF\": 178.175863,", + " \"DKK\": 7.009313,", + " \"DOP\": 55.539156,", + " \"DZD\": 136.526375,", + " \"EGP\": 30.743014,", + " \"ERN\": 14.987908,", + " \"ETB\": 53.840023,", + " \"EUR\": 0.942228,", + " \"FJD\": 2.210902,", + " \"FKP\": 0.83471,", + " \"GBP\": 0.834759,", + " \"GEL\": 2.598071,", + " \"GGP\": 0.834647,", + " \"GHS\": 12.759418,", + " \"GIP\": 0.834672,", + " \"GMD\": 60.98912,", + " \"GNF\": 8615.060299,", + " \"GTQ\": 7.816555,", + " \"GYD\": 211.148725,", + " \"HKD\": 7.843114,", + " \"HNL\": 24.676398,", + " \"HRK\": 7.096534,", + " \"HTG\": 151.107107,", + " \"HUF\": 354.546511,", + " \"IDR\": 15305.816425,", + " \"ILS\": 3.659591,", + " \"IMP\": 0.83482,", + " \"INR\": 82.271752,", + " \"IQD\": 1460.523392,", + " \"IRR\": 42214.667089,", + " \"ISK\": 142.311052,", + " \"JEP\": 0.83532,", + " \"JMD\": 154.109032,", + " \"JOD\": 0.709871,", + " \"JPY\": 136.579884,", + " \"KES\": 127.794041,", + " \"KGS\": 87.345932,", + " \"KHR\": 4067.915978,", + " \"KMF\": 464.562389,", + " \"KPW\": 899.247674,", + " \"KRW\": 1302.190934,", + " \"KWD\": 0.307326,", + " \"KYD\": 0.83405,", + " \"KZT\": 436.101643,", + " \"LAK\": 16873.790213,", + " \"LBP\": 15020.521133,", + " \"LKR\": 345.92388,", + " \"LRD\": 159.117366,", + " \"LSL\": 18.20456,", + " \"LYD\": 4.835853,", + " \"MAD\": 10.388795,", + " \"MDL\": 18.888917,", + " \"MGA\": 4296.352625,", + " \"MKD\": 58.02969,", + " \"MMK\": 2101.470623,", + " \"MNT\": 3404.116439,", + " \"MOP\": 8.091167,", + " \"MRU\": 36.386096,", + " \"MUR\": 46.641155,", + " \"MVR\": 15.347871,", + " \"MWK\": 1027.828846,", + " \"MXN\": 18.098725,", + " \"MYR\": 4.474645,", + " \"MZN\": 63.797698,", + " \"NAD\": 18.214751,", + " \"NGN\": 460.317636,", + " \"NIO\": 36.600644,", + " \"NOK\": 10.424506,", + " \"NPR\": 132.235448,", + " \"NZD\": 1.604879,", + " \"OMR\": 0.385743,", + " \"PAB\": 0.999902,", + " \"PEN\": 3.770718,", + " \"PGK\": 3.527422,", + " \"PHP\": 54.844041,", + " \"PKR\": 278.695386,", + " \"PLN\": 4.423791,", + " \"PYG\": 7220.315472,", + " \"QAR\": 3.651532,", + " \"RON\": 4.637626,", + " \"RSD\": 110.496314,", + " \"RUB\": 75.238572,", + " \"RWF\": 1091.764956,", + " \"SAR\": 3.750399,", + " \"SBD\": 8.239938,", + " \"SCR\": 13.476738,", + " \"SDG\": 590.506115,", + " \"SEK\": 10.481266,", + " \"SGD\": 1.346505,", + " \"SHP\": 0.834776,", + " \"SLL\": 17650.226858,", + " \"SOS\": 568.863447,", + " \"SRD\": 33.904806,", + " \"SSP\": 130.15096,", + " \"STD\": 22804.902808,", + " \"STN\": 23.075404,", + " \"SVC\": 8.756667,", + " \"SYP\": 2510.429835,", + " \"SZL\": 18.20316,", + " \"THB\": 34.771491,", + " \"TJS\": 10.006042,", + " \"TMT\": 3.507758,", + " \"TND\": 3.129616,", + " \"TOP\": 2.355679,", + " \"TRY\": 18.879408,", + " \"TTD\": 6.789468,", + " \"TWD\": 30.624624,", + " \"TZS\": 2330.0501,", + " \"UAH\": 36.958426,", + " \"UGX\": 3718.628848,", + " \"USD\": 1,", + " \"UYU\": 38.884596,", + " \"UZS\": 11371.806807,", + " \"VES\": 24.306068,", + " \"VND\": 23702.143038,", + " \"VUV\": 117.94585,", + " \"WST\": 2.695482,", + " \"XAF\": 617.756757,", + " \"XAG\": 0.047556,", + " \"XAU\": 0.0011,", + " \"XCD\": 2.700451,", + " \"XDR\": 0.751352,", + " \"XOF\": 617.756728,", + " \"XPD\": 0.001709,", + " \"XPF\": 112.382643,", + " \"XPT\": 0.001221,", + " \"YER\": 250.041827,", + " \"ZAR\": 18.172541,", + " \"ZMW\": 19.989716,", + " \"ZWL\": 321.731101", + " }", + "}", + "", + "const sourceCurrency = fxQuoteBody.conversionTerms.sourceAmount?.currency", + "const targetCurrency = fxQuoteBody.conversionTerms.targetAmount?.currency", + "let conversionRate = 1", + "", + "if(sourceCurrency === fxRates.base) {", + " conversionRate = fxRates.rates[targetCurrency]", + "} else {", + " const invertConvRate1 = fxRates.rates[sourceCurrency]", + " const baseConvRate = fxRates.rates[targetCurrency]", + " conversionRate = (baseConvRate / invertConvRate1)", + "}", + "", + "const sourceAmount = fxQuoteBody.conversionTerms.sourceAmount.amount", + "const targetAmount = fxQuoteBody.conversionTerms.targetAmount.amount", + "", + "let newSourceAmount = sourceAmount", + "let newTargetAmount = targetAmount", + "", + "if (!sourceAmount) {", + " newSourceAmount = Math.round(targetAmount / conversionRate)", + "}", + "", + "if (!targetAmount) {", + " newTargetAmount = Math.round(sourceAmount * conversionRate)", + "}", + "", + "const chargesPercent = 2", + "const chargesSourceAmount = Math.round(newSourceAmount * chargesPercent) / 100", + "const chargesTargetAmount = Math.round(newTargetAmount * chargesPercent) / 100", + "", + "custom.appendEventBody({", + " conversionTerms: {", + " sourceAmount: {", + " amount: newSourceAmount + \"\"", + " },", + " targetAmount: {", + " amount: newTargetAmount + \"\"", + " },", + " charges: [", + " {", + " chargeType: \"currency conversion\",", + " sourceAmount: {", + " amount: chargesSourceAmount + \"\",", + " currency: sourceCurrency", + " },", + " targetAmount: {", + " amount: chargesTargetAmount + \"\",", + " currency: targetCurrency", + " }", + " }", + " ]", + " }", + "})" + ], + "scriptingEngine": "javascript" + } }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/quoterequests" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] + "path": null, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 13, + "priority": 1, + "description": "FXP - Generic error for post /fxTransfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false, + "specFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_connector_backend_2.1/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "502", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "5002", + "message": "Generic forex transfer error" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } }, - "event": { - "method": null, - "path": null, - "params": { - "body": { - "quoteId": "{$request.body.quoteId}", - "transactionId": "{$request.body.transactionId}", - "transferAmount": "{$request.body.amount}", - "transferAmountCurrency": "{$request.body.currency}" - }, - "statusCode": "200", - "scripts": { - "scriptingEngine": "postman" - } + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 15, + "priority": 1, + "description": "FXP - Timeout scenario for post /fxTransfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false, + "specFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_connector_backend_2.1/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "504", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" }, - "type": "FIXED_RESPONSE" + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeTransactionId": "{$request.body.homeTransactionId}", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + }, + "delay": 300000 }, - "type": "response", - "version": 1 - }, - { - "ruleId": 10, - "priority": 1, - "description": "post /transfers", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 2, - "type": "mojaloop_connector_backend", - "asynchronous": false + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 16, + "priority": 1, + "description": "FXP - ABORTED state for post /fxTransfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false, + "specFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_connector_backend_2.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_connector_backend_2.1/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "506", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeTransactionId": "{$request.body.homeTransactionId}", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "ABORTED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 7, + "priority": 1, + "description": "FXP - post /fxTransfers response", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeTransactionId": "{$request.body.homeTransactionId}", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } }, - "event": { - "method": null, - "path": null, - "params": { - "body": { - "completedTimestamp": "{$environment.completedTimestamp}", - "homeTransactionId": "123", - "transferState": "COMMITTED" - }, - "statusCode": "200", - "scripts": { - "exec": [ - "environment.completedTimestamp = new Date().toISOString()" - ], - "scriptingEngine": "javascript" - } + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 8, + "priority": 1, + "description": "get /parties/{idType}/{idValue}", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" }, - "type": "FIXED_RESPONSE" + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "dateOfBirth": "1966-06-16", + "displayName": "Yaro", + "firstName": "Yaro", + "fspId": "pm4mltest2", + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "lastName": "Smith", + "merchantClassificationCode": "1234", + "middleName": "", + "kycInformation": "This is encrypted KYC information" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } }, - "type": "response", - "version": 1 - }, - { - "ruleId": 11, - "priority": 1, - "description": "post /transactionrequests", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 2, - "type": "mojaloop_connector_backend", - "asynchronous": true + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 9, + "priority": 1, + "description": "post /quoterequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quoterequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactionrequests" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 10, + "priority": 1, + "description": "post /transfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "completedTimestamp": "{$environment.completedTimestamp}", + "homeTransactionId": "123", + "transferState": "COMMITTED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } }, - "event": { - "method": null, - "path": null, - "params": { - "body": { - "homeR2PTransactionId": "cba321", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestState": "RECEIVED" - }, - "statusCode": "200", - "scripts": { - "exec": [ - "const reqBody = JSON.parse(request.body)", - "const outEndpoint = userConfig.CALLBACK_ENDPOINT", - "const outReqBody = {", - " transactionRequestId: reqBody.transactionRequestId,", - " homeR2PTransactionId: 'abc123',", - " from: reqBody.to,", - " to: reqBody.from,", - " amountType: \"RECEIVE\",", - " currency: reqBody.currency,", - " amount: reqBody.amount,", - " scenario: \"DEPOSIT\",", - " initiator: reqBody.initiator,", - " initiatorType: reqBody.initiatorType,", - " note: \"Note sent to Payee.\"", - "}", - "try {", - " const axioResponse = await axios({", - " method: 'post',", - " url: outEndpoint + '/requestToPayTransfer',", - " data: outReqBody", - " });", - " res = axioResponse.data;", - " responseCode = axioResponse.code || axioResponse.status", - "} catch (err) {", - " console.log(err)", - "}", - "" - ], - "scriptingEngine": "javascript" - } + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 11, + "priority": 1, + "description": "post /transactionrequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionrequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeR2PTransactionId": "cba321", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestState": "RECEIVED" }, - "type": "MOCK_RESPONSE" + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const outEndpoint = userConfig.CALLBACK_ENDPOINT", + "const outReqBody = {", + " transactionRequestId: reqBody.transactionRequestId,", + " homeR2PTransactionId: 'abc123',", + " from: reqBody.to,", + " to: reqBody.from,", + " amountType: \"RECEIVE\",", + " currency: reqBody.currency,", + " amount: reqBody.amount,", + " scenario: \"DEPOSIT\",", + " initiator: reqBody.initiator,", + " initiatorType: reqBody.initiatorType,", + " note: \"Note sent to Payee.\"", + "}", + "try {", + " const axioResponse = await axios({", + " method: 'post',", + " url: outEndpoint + '/requestToPayTransfer',", + " data: outReqBody", + " });", + " res = axioResponse.data;", + " responseCode = axioResponse.code || axioResponse.status", + "} catch (err) {", + " console.log(err)", + "}", + "" + ], + "scriptingEngine": "javascript" + } }, - "type": "response", - "version": 1 - } + "type": "MOCK_RESPONSE" + }, + "type": "response", + "version": 1 + } ] \ No newline at end of file From 5485685e3f2b556184377cf0ddff3a866432967e Mon Sep 17 00:00:00 2001 From: Sridevi Miriyala <38143240+sri-miriyala@users.noreply.github.com> Date: Tue, 16 Jul 2024 07:53:07 -0400 Subject: [PATCH 11/39] PR for Proxy Discovery GP (#151) * feat(mojaloop/#3984): parameterize switch id (#149) * Initial commit * Updates for additional scenarios --------- Co-authored-by: Steven Oderayi --- .../happy_path/discovery.json | 326 ++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 collections/proxy/proxy_golden_path/happy_path/discovery.json diff --git a/collections/proxy/proxy_golden_path/happy_path/discovery.json b/collections/proxy/proxy_golden_path/happy_path/discovery.json new file mode 100644 index 00000000..0249c001 --- /dev/null +++ b/collections/proxy/proxy_golden_path/happy_path/discovery.json @@ -0,0 +1,326 @@ +{ + "name": "Party Lookup Happy Path", + "test_cases": [ + { + "id": "1", + "name": "Party Lookup for ProxyAB if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as Payeefsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" + ] + }, + { + "id": 6, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle has Proxy Payee DFSP set", + "exec": [ + "expect(response.fspId).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + } + ] + } + } + ] + } + ] + }, + { + "id": "2", + "name": "Party Lookup for other proxy in Scheme if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "an error callback is expected", + "exec": [ + "expect(callback.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_CODE}')", + "expect(callback.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + } + } + ] + } + ] + }, + { + "id": "3", + "name": "Party Lookup for Proxy in Scheme if it is cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + } + } + ] + } + ] + } + ] + } \ No newline at end of file From 437118d18719c2a34075c256e3e4b42b84238855 Mon Sep 17 00:00:00 2001 From: Sridevi Miriyala <38143240+sri-miriyala@users.noreply.github.com> Date: Tue, 16 Jul 2024 07:53:31 -0400 Subject: [PATCH 12/39] Feat/#225 proxy gp quotes (#152) * feat(mojaloop/#3984): parameterize switch id (#149) * Initial commit * Updates for additional scenarios * quotes happy path * env file for proxy * negative test case for discovery * Updated collections to use env variables * Updated negative test cases for quotes * Added a new test case for parties negative scenario * Added 2 more test cases --------- Co-authored-by: Steven Oderayi --- .../proxy_golden_path/happy_path/quotes.json | 816 ++++++++++++++++ .../negative_scenarios/discovery.json | 727 +++++++++++++++ .../negative_scenarios/quotes.json | 874 ++++++++++++++++++ environments/proxy_env.json | 51 + 4 files changed, 2468 insertions(+) create mode 100644 collections/proxy/proxy_golden_path/happy_path/quotes.json create mode 100644 collections/proxy/proxy_golden_path/negative_scenarios/discovery.json create mode 100644 collections/proxy/proxy_golden_path/negative_scenarios/quotes.json create mode 100644 environments/proxy_env.json diff --git a/collections/proxy/proxy_golden_path/happy_path/quotes.json b/collections/proxy/proxy_golden_path/happy_path/quotes.json new file mode 100644 index 00000000..044cc43b --- /dev/null +++ b/collections/proxy/proxy_golden_path/happy_path/quotes.json @@ -0,0 +1,816 @@ +{ + "name": "Quotes Happy Path", + "test_cases": [ + { + "id": 1, + "name": "Proxy Quoting Service", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Source equal to request FSP Destination", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" + ] + }, + { + "id": 5, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "Get health status of Quoting Service" + }, + "description": "Get health status of Quoting Service", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/health", + "path": "/health", + "method": "get", + "url": "{$inputs.HOST_QUOTING_SERVICE_HANDLER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Response services to be an array", + "exec": [ + "expect(response.body.services).to.be.an('array');" + ] + }, + { + "id": 3, + "description": "Expected services to have data store and status is OK", + "exec": [ + "if(!environment.SIMPLE_ROUTING_MODE_ENABLED) {", + " expect(environment.datastoreOKx).to.be.an('object')", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "headers": { + "FSPIOP-Source": "{$inputs.payerfsp}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scripts": { + "postRequest": { + "exec": [ + " const datastoreOK = response.body.services.find(item => {\r", + " return item.name=='datastore' && item.status=='OK'; \r", + " });\r", + " \r", + "environment.datastoreOKx=datastoreOK; \r", + "console.log(environment.datastoreOKx);" + ] + } + } + }, + { + "id": 6, + "meta": { + "info": "Get Quote" + }, + "description": "Get Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes/{ID}", + "path": "/quotes/{$prev.4.request.body.quoteId}", + "method": "get", + "params": { + "ID": "{$prev.4.request.body.quoteId}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": true, + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.payerfsp}", + "FSPIOP-Destination": "{$inputs.toFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "Content-Type": "{$inputs.contentTypeQuotes}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Send quote - missing date" + }, + "description": "Send quote - missing date", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "FSPIOP-Source": "{$inputs.toFspId}", + "FSPIOP-Destination": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.toFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.toIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.toFspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "5", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + }, + { + "id": 3, + "description": "Check Error code 3102", + "exec": [ + "expect(response.body.errorInformation.errorCode).to.equal('3102')" + ] + }, + { + "id": 4, + "description": "Error message date is required", + "exec": [ + "expect(response.body.errorInformation.errorDescription).to.include('date');" + ] + }, + { + "id": 5, + "description": "Missing mandatory element error", + "exec": [ + "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element ');" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "", + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 8, + "meta": { + "info": "Send quote Copy" + }, + "description": "Send quote Copy", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", + "FSPIOP-Destination": "{$inputs.toFspId}", + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.toIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.toFspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "5", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + }, + { + "id": 2, + "description": "Check Error code 3102", + "exec": [ + "expect(response.body.errorInformation.errorCode).to.equal('3102')" + ] + }, + { + "id": 3, + "description": "Check Missing mandatory element - Invalid accept header", + "exec": [ + "expect(response.body.errorInformation.errorDescription).to.include('/header must have required property \\'accept\\'');" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "", + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 9, + "meta": { + "info": "Get Quote - Missing content type" + }, + "description": "Get Quote - Missing content type", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes/{ID}", + "path": "/quotes/{$prev.4.request.body.quoteId}", + "method": "get", + "params": { + "ID": "{$prev.4.request.body.quoteId}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": false, + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.payerfsp}", + "FSPIOP-Destination": "{$inputs.toFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + }, + { + "id": 2, + "description": "Missing mandatory element error", + "exec": [ + "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element ');" + ] + }, + { + "id": 3, + "description": "Check Error code 3102", + "exec": [ + "expect(response.body.errorInformation.errorCode).to.equal('3102')" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Get Quote - Invalid content type" + }, + "description": "Get Quote - Invalid content type", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes/{ID}", + "path": "/quotes/{$prev.4.request.body.quoteId}", + "method": "get", + "params": { + "ID": "{$prev.4.request.body.quoteId}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": false, + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.payerfsp}", + "FSPIOP-Destination": "{$inputs.toFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "Content-Type": "{$inputs.contentTypeTransfers}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + }, + { + "id": 2, + "description": "Check Malformed syntax error", + "exec": [ + "expect(response.body.errorInformation.errorDescription).to.include('Malformed syntax');" + ] + }, + { + "id": 3, + "description": "Check Error code 3101", + "exec": [ + "expect(response.body.errorInformation.errorCode).to.equal('3101')" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + }, + { + "id": "2", + "name": "Party Lookup for other proxy in Scheme if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "an error callback is expected", + "exec": [ + "expect(callback.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_CODE}')", + "expect(callback.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + } + } + ] + } + ] + }, + { + "id": "3", + "name": "Party Lookup for Proxy in Scheme if it is cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + } + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json b/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json new file mode 100644 index 00000000..85965345 --- /dev/null +++ b/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json @@ -0,0 +1,727 @@ +{ + "name": "Party Lookup Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for Bad Request - 400", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + } + ] + }, + { + "id": "2", + "name": "Test Case for error in Payer Scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + } + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + } + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "3", + "name": "Test Case for scenario where the receiving dfsp is not in payer proxy cache", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "4", + "name": "Test Case for scenario when there is an error in proxy", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Source Header should be proxy", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('${inputs.FSPIOP_PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "5", + "name": "Test Case for scenario when there is an error in payee scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + } + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + } + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "6", + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 5xxx", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "7", + "name": "Party Lookup for scenario when there is an eror in Oracle", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "8", + "name": "Party Lookup for scenario when there are multiple calls to GET /parties with same Type and ID but different error codes", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as Payeefsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" + ] + }, + { + "id": 6, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as Payeefsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" + ] + }, + { + "id": 6, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + } + ] + }, + { + "id": "9", + "name": "Party Lookup for Payer Cache no longer valid", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION}')" + ] + } + ] + } + }, + { + "id": "2", + "name": "Oracle Lookup", + "requests": [ + { + "id": "1", + "description": "Send Oracle lookup request", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have mapping for the party ID", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + } + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/negative_scenarios/quotes.json b/collections/proxy/proxy_golden_path/negative_scenarios/quotes.json new file mode 100644 index 00000000..6a2074c8 --- /dev/null +++ b/collections/proxy/proxy_golden_path/negative_scenarios/quotes.json @@ -0,0 +1,874 @@ +{ + "name": "Quotes Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for Bad Request - 400", + "requests": [ + { + "id": "1", + "description": "Quote request", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + } + ] + }, + { + "id": "2", + "name": "Test Case for error in Payer Scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + } + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + } + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "3", + "name": "Test Case for scenario where the receiving dfsp is not in payer proxy cache", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "4", + "name": "Test Case for scenario when there is an error in proxy", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Source Header should be proxy", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('${inputs.FSPIOP_PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "5", + "name": "Test Case for scenario when there is an error in payee scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + } + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + } + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "6", + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 5xxx", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + }, + "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + } + ] + } \ No newline at end of file diff --git a/environments/proxy_env.json b/environments/proxy_env.json new file mode 100644 index 00000000..8c2731a7 --- /dev/null +++ b/environments/proxy_env.json @@ -0,0 +1,51 @@ +{ + "inputValues": { + "FSPIOP_PROXY_HEADER": "TBD", + "PROXY_PAYERFSP_PARTY_ID_TYPE": "MSISDN", + "PROXY_PAYERFSP_PARTY_ID": "123456", + "PROXY_PAYERFSP_PARTY_FIRST_NAME": "Proxy_Payer_First", + "PROXY_PAYERFSP_PARTY_LAST_NAME": "Proxy_Payer_Last", + "PROXY_PAYERFSP_PARTY_DOB": "10-10-2000", + "PROXY_PAYEEFSP_PARTY_ID_TYPE": "MSISDN", + "PROXY_PAYEEFSP_PARTY_ID": "788912", + "PROXY_PAYEEFSP_PARTY_FIRST_NAME": "Proxy_Payee_First", + "PROXY_PAYEEFSP_PARTY_LAST_NAME": "Proxy_Payee_Last", + "PROXY_PAYEEFSP_PARTY_DOB": "10-10-2000", + "PROXY_AMOUNT": "100", + "PROXY_CURRENCY": "USD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_2XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_3XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_4XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_5XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE": "3201", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE": "3100", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION": "TBD", + "PAYEE_SCHEME_ERROR_CODE_2XXX": "TBD", + "PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", + "PAYEE_SCHEME_ERROR_CODE_3XXX": "TBD", + "PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", + "PAYEE_SCHEME_ERROR_CODE_4XXX": "TBD", + "PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", + "PAYEE_SCHEME_ERROR_CODE_5XXX": "TBD", + "PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "TBD", + "PAYEE_DFSP_ERROR_CODE_5XXX": "TBD", + "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE": "5107", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD" + } +} \ No newline at end of file From 1a8ebc8bd0dd843854692bff9e9a18a9922d4632 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Thu, 1 Aug 2024 10:11:19 +0000 Subject: [PATCH 13/39] fix: add proxy support --- collections/hub/provisioning_dfsp/newdfsp.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collections/hub/provisioning_dfsp/newdfsp.json b/collections/hub/provisioning_dfsp/newdfsp.json index 20296b8a..75881164 100644 --- a/collections/hub/provisioning_dfsp/newdfsp.json +++ b/collections/hub/provisioning_dfsp/newdfsp.json @@ -24,7 +24,8 @@ "method": "post", "body": { "name": "{$inputs.DFSP_NAME}", - "currency": "{$inputs.currency}" + "currency": "{$inputs.currency}", + "isProxy": "{$inputs.isProxy}" }, "headers": { "Content-Type": "application/json", From ac20ba942b99013aa12cda5d0a7a014cca54a506 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Thu, 1 Aug 2024 13:22:56 +0300 Subject: [PATCH 14/39] feat(mojaloop/#3984): parameterize switch id (#149) (#155) Co-authored-by: Steven Oderayi From 873ccb2a58b7cdc85ae2a95affab31465300d258 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Fri, 2 Aug 2024 12:55:25 +0300 Subject: [PATCH 15/39] fix: create settlement and reconciliation accounts in the hub for the DFSP currency (#156) --- .../hub/provisioning_dfsp/newdfsp.json | 99 ++++++++++++++++++- 1 file changed, 96 insertions(+), 3 deletions(-) diff --git a/collections/hub/provisioning_dfsp/newdfsp.json b/collections/hub/provisioning_dfsp/newdfsp.json index 75881164..efc15bf3 100644 --- a/collections/hub/provisioning_dfsp/newdfsp.json +++ b/collections/hub/provisioning_dfsp/newdfsp.json @@ -3,7 +3,100 @@ "test_cases": [ { "id": 1, - "name": "Setup Accounts and Limits", + "name": "Setup Hub accounts", + "meta": { + "info": "Hub account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT Second Currency" + }, + "description": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT Second Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the DFSP currency" + }, + "description": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the DFSP currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Setup DFSP accounts and limits", "meta": { "info": "DFSP account" }, @@ -265,7 +358,7 @@ } }, { - "id": 2, + "id": 3, "name": "Setup Callback Endpoints", "meta": { "info": "DFSP callbacks" @@ -1247,7 +1340,7 @@ } }, { - "id": 3, + "id": 4, "name": "Setup Notification Emails", "meta": { "info": "DFSP notification_emails" From bfb3df50f8ca56c15b426c1b86f6aaf54bf4125d Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Wed, 21 Aug 2024 12:02:53 +0000 Subject: [PATCH 16/39] fxp provisioning --- collections/hub/provisioning_fxp/newfxp.json | 272 +++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 collections/hub/provisioning_fxp/newfxp.json diff --git a/collections/hub/provisioning_fxp/newfxp.json b/collections/hub/provisioning_fxp/newfxp.json new file mode 100644 index 00000000..b7948652 --- /dev/null +++ b/collections/hub/provisioning_fxp/newfxp.json @@ -0,0 +1,272 @@ +{ + "options": {}, + "name": "switch_onboarding_participant_fxp", + "test_cases": [ + { + "id": 1, + "name": "Accounts", + "meta": { + "info": "Accounts" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add participant" + }, + "description": "Add participant FX Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.DFSP_NAME}", + "currency": "{$inputs.fxpCurrency}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits" + }, + "description": "Add initial position and limits for FX Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.DFSP_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "body": { + "currency": "{$inputs.fxpCurrency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Funds In", + "meta": { + "info": "Funds In" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Get Status Request before deposit" + }, + "description": "Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSP_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('fxpCurrency')) {", + " pm.environment.set(\"fxpCurrency1SettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"fxpCurrency1SettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "Deposit Funds in Settlement Account" + }, + "description": "Deposit Funds in Settlement Account FX Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.DFSP_NAME}/accounts/{$environment.fxpCurrency1SettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}", + "id": "{$environment.fxpCurrency1SettlementAccountId}" + }, + "body": { + "transferId": "{$environment.fxpCurrency1fundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.fxpCurrency1fundsInPrepareAmount}", + "currency": "{$inputs.fxpCurrency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('fxpCurrency1fundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('fxpCurrency1fundsInPrepareAmount', 5000000);" + ] + } + } + }, + { + "id": 3, + "meta": { + "info": "Get Status Request after deposit" + }, + "description": "Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSP_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.fxpCurrency1SettlementAccountBalanceAfterFundsIn).to.equal(+environment.fxpCurrency1SettlementAccountBalanceBeforeFundsIn - +environment.fxpCurrency1fundsInPrepareAmount)" + ] + } + ] + }, + "delay": "500", + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('fxpCurrency')) {", + " pm.environment.set(\"fxpCurrency1SettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + } + ] + } + ] +} \ No newline at end of file From 89ca7927f3ce605b983f7c0d4861f6903c3d33a8 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Wed, 21 Aug 2024 13:16:14 +0000 Subject: [PATCH 17/39] fxp provisioning --- collections/hub/provisioning_fxp/newfxp.json | 103 ++++++++++++++++++- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/collections/hub/provisioning_fxp/newfxp.json b/collections/hub/provisioning_fxp/newfxp.json index b7948652..a209ae29 100644 --- a/collections/hub/provisioning_fxp/newfxp.json +++ b/collections/hub/provisioning_fxp/newfxp.json @@ -4,17 +4,110 @@ "test_cases": [ { "id": 1, - "name": "Accounts", + "name": "Setup Hub accounts", "meta": { - "info": "Accounts" + "info": "Hub account" }, "requests": [ { "id": 1, "meta": { - "info": "Add participant" + "info": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT FXP Currency" }, - "description": "Add participant FX Currency", + "description": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT FXP Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.fxpCurrency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the FXP currency" + }, + "description": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the FXP currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.fxpCurrency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Setup FXP Accounts", + "meta": { + "info": "FXP Accounts" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add FXP participant" + }, + "description": "Add FXP participant currency", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -95,7 +188,7 @@ ] }, { - "id": 2, + "id": 3, "name": "Funds In", "meta": { "info": "Funds In" From 46caecf468cdb8d77a405b18dad54a8e82651940 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 22 Aug 2024 00:40:46 +0530 Subject: [PATCH 18/39] fix: fxquotes --- .../spec_files/rules_callback/default.json | 253 +++++------------- 1 file changed, 62 insertions(+), 191 deletions(-) diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json index 8d85d9aa..162b1130 100644 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json @@ -1323,7 +1323,9 @@ "currency": "{$request.body.amount.currency}", "amount": "{$environment.quotePayeeFspCommission}" }, - "expiration": "{$environment.quoteExpiration}" + "expiration": "{$environment.quoteExpiration}", + "ilpPacket": "AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA", + "condition": "f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA" }, "scripts": { "exec": [ @@ -1338,10 +1340,16 @@ "environment.quoteExpiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" ], "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" } }, "delay": 0, - "type": "MOCK_CALLBACK" + "type": "FIXED_CALLBACK" } }, { @@ -1935,88 +1943,19 @@ } }, { - "ruleId": 21, - "priority": 1, - "description": "get /fxParties/{Type}/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxParties/{Type}/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/fxParties/{Type}/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 22, - "priority": 1, - "description": "get /fxParties/{Type}/{ID}/{SubId}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxParties/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/fxParties/{Type}/{ID}/{SubId}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 23, + "ruleId": 50, "priority": 1, "description": "post /fxQuotes", "apiVersion": { "minorVersion": 0, "majorVersion": 2, - "type": "fx-api", - "asynchronous": true + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" }, "conditions": { "all": [ @@ -2037,123 +1976,55 @@ "path": "/fxQuotes/{ID}", "params": { "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 24, - "priority": 1, - "description": "get /fxQuotes/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxQuotes/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/fxQuotes/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 25, - "priority": 1, - "description": "post /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxTransfers" + "exec": [ + "const fxQuoteBody = JSON.parse(request.body)", + "environment.sourceAmountValue = fxQuoteBody.conversionTerms.sourceAmount.amount || 500", + "environment.targetAmountValue = fxQuoteBody.conversionTerms.targetAmount.amount || 500" + ], + "scriptingEngine": "javascript" }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/fxTransfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 26, - "priority": 1, - "description": "get /fxTransfers/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxTransfers/{ID}" + "body": { + "condition": "f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA", + "conversionTerms": { + "conversionId": "{$request.body.conversionTerms.conversionId}", + "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "initiatingFsp": "PayerFSP", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}", + "amount": "{$environment.sourceAmountValue}" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}", + "amount": "{$environment.targetAmountValue}" + }, + "charges": [ + { + "chargeType": "string", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}", + "amount": "33" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}", + "amount": "6000" + } + } + ], + "expiration": "2023-12-25T14:17:09.663+01:00" + } }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/fxTransfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" } }, - "type": "MOCK_CALLBACK" + "type": "FIXED_CALLBACK" }, "type": "callback", "version": 1 } -] +] \ No newline at end of file From a5e955df2e7895ec2c8512f2184e9748d2aad4b8 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 22 Aug 2024 18:12:34 +0530 Subject: [PATCH 19/39] feat: added fxTransfer rule --- .../spec_files/rules_callback/default.json | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json index 162b1130..f039a08b 100644 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json @@ -2026,5 +2026,62 @@ }, "type": "callback", "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "post /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + }, + "body": { + "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED", + "extensionList": null + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 } ] \ No newline at end of file From ee0212182a5633b2b74564e66757f5dd7178bbc6 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 22 Aug 2024 18:38:08 +0530 Subject: [PATCH 20/39] fix: fxtransfers --- .../ml-testing-toolkit/spec_files/rules_callback/default.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json index f039a08b..7511fb39 100644 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json @@ -2069,8 +2069,7 @@ "body": { "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", "completedTimestamp": "{$environment.completedTimestamp}", - "conversionState": "RESERVED", - "extensionList": null + "conversionState": "RESERVED" }, "headers": { "Content-Type": "{$request.headers.content-type}", From 3eecc7ee8a8c7bfbad397986e2da7616353baa4d Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Fri, 23 Aug 2024 10:25:07 +0000 Subject: [PATCH 21/39] fix: fxp provisioning endpoints --- collections/hub/provisioning_fxp/newfxp.json | 1102 ++++++++++++++++++ 1 file changed, 1102 insertions(+) diff --git a/collections/hub/provisioning_fxp/newfxp.json b/collections/hub/provisioning_fxp/newfxp.json index a209ae29..18d0c475 100644 --- a/collections/hub/provisioning_fxp/newfxp.json +++ b/collections/hub/provisioning_fxp/newfxp.json @@ -360,6 +360,1108 @@ } } ] + }, + { + "id": 4, + "name": "Setup Callback Endpoints", + "meta": { + "info": "FXP callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add FXP callback - AUTHORIZATIONS" + }, + "description": "Add FXP callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.DFSP_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add FXP callback - PARTICIPANT PUT" + }, + "description": "Add FXP callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add FXP callback - PARTICIPANT PUT Error" + }, + "description": "Add FXP callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add FXP callback - PARTICIPANT PUT Batch" + }, + "description": "Add FXP callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add FXP callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add FXP callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add FXP callback - PARTIES GET" + }, + "description": "Add FXP callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add FXP callback - PARTIES PUT" + }, + "description": "Add FXP callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add FXP callback - PARTIES PUT Error" + }, + "description": "Add FXP callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add FXP callback - QUOTES" + }, + "description": "Add FXP callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.DFSP_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add FXP callback - TXN REQUEST" + }, + "description": "Add FXP callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.DFSP_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add FXP callback - TRANSFERS POST" + }, + "description": "Add FXP callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.DFSP_CALLBACK_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add FXP callback - TRANSFERS PUT" + }, + "description": "Add FXP callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add FXP callback - TRANSFERS ERROR" + }, + "description": "Add FXP callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add FXP callback - BULK-TRANSFER POST" + }, + "description": "Add FXP callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.DFSP_CALLBACK_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add FXP callback - BULK-TRANSFER PUT" + }, + "description": "Add FXP callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add FXP callback - BULK-TRANSFER ERROR" + }, + "description": "Add FXP callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add FXP callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add FXP callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add FXP callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add FXP callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add FXP callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add FXP callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.DFSP_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add FXP callback - PARTIES SUB-ID GET" + }, + "description": "Add FXP callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add FXP callback - PARTIES SUB-ID PUT" + }, + "description": "Add FXP callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add FXP callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add FXP callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.DFSP_CALLBACK_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.DFSP_CALLBACK_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.DFSP_CALLBACK_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.DFSP_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + }, + { + "id": 5, + "name": "Setup Notification Emails", + "meta": { + "info": "FXP notification_emails" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.DFSP_NAME}" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.DFSP_NAME}" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] } ] } \ No newline at end of file From 110a2a0c6cbe05d44468202de2a58b02482c23da Mon Sep 17 00:00:00 2001 From: Vijay Date: Mon, 26 Aug 2024 18:38:13 +0530 Subject: [PATCH 22/39] fix: fxquotes rule --- .../spec_files/rules_callback/default.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json index 7511fb39..4192ac58 100644 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json @@ -1984,13 +1984,13 @@ "scriptingEngine": "javascript" }, "body": { - "condition": "f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA", + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", "conversionTerms": { "conversionId": "{$request.body.conversionTerms.conversionId}", - "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", - "initiatingFsp": "PayerFSP", + "determiningTransferId": "{$request.body.conversionTerms.determiningTransferId}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", - "amountType": "SEND", + "amountType": "{$request.body.conversionTerms.amountType}", "sourceAmount": { "currency": "{$request.body.conversionTerms.sourceAmount.currency}", "amount": "{$environment.sourceAmountValue}" @@ -2012,7 +2012,7 @@ } } ], - "expiration": "2023-12-25T14:17:09.663+01:00" + "expiration": "2025-12-25T14:17:09.663+01:00" } }, "headers": { @@ -2067,7 +2067,7 @@ "scriptingEngine": "javascript" }, "body": { - "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "fulfilment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", "completedTimestamp": "{$environment.completedTimestamp}", "conversionState": "RESERVED" }, From 36a77e1899b5500f361cc0d65fad3300cf2f347b Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 28 Aug 2024 17:22:27 +0530 Subject: [PATCH 23/39] chore: values --- rules/pm4ml/fxp_response_rules.json | 55 +++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/rules/pm4ml/fxp_response_rules.json b/rules/pm4ml/fxp_response_rules.json index 1e2d6693..60866001 100644 --- a/rules/pm4ml/fxp_response_rules.json +++ b/rules/pm4ml/fxp_response_rules.json @@ -369,7 +369,7 @@ " newTargetAmount = Math.round(sourceAmount * conversionRate)", "}", "", - "const chargesPercent = 2", + "const chargesPercent = 5", "const chargesSourceAmount = Math.round(newSourceAmount * chargesPercent) / 100", "const chargesTargetAmount = Math.round(newTargetAmount * chargesPercent) / 100", "", @@ -650,12 +650,12 @@ "params": { "body": { "dateOfBirth": "1966-06-16", - "displayName": "Yaro", - "firstName": "Yaro", - "fspId": "pm4mltest2", + "displayName": "Chikondi Banda", + "firstName": "Chikondi", + "fspId": "testpayee", "idType": "MSISDN", "idValue": "{$request.params.idValue}", - "lastName": "Smith", + "lastName": "Banda", "merchantClassificationCode": "1234", "middleName": "", "kycInformation": "This is encrypted KYC information" @@ -750,7 +750,50 @@ "statusCode": "200", "scripts": { "exec": [ - "environment.completedTimestamp = new Date().toISOString()" + "environment.completedTimestamp = new Date().toISOString()", + "", + "const requestBody = JSON.parse(request.body)", + "", + "const toPartyId = requestBody.to.idType + '/' + requestBody.to.idValue", + "", + "if (!environment.partyData) {", + " environment.partyData = {}", + "}", + "", + "if (!environment.partyData[toPartyId]) {", + " environment.partyData[toPartyId] = {}", + "}", + "", + "const partyData = environment.partyData[toPartyId]", + "", + "if (!partyData.balance) {", + " partyData.balance = {}", + "}", + "", + "if (!partyData.balance[requestBody.currency]) {", + " partyData.balance[requestBody.currency] = 0", + "}", + "", + "partyData.balance[requestBody.currency] += +requestBody.amount", + "", + "", + "if (!partyData.transactionHistory) {", + " partyData.transactionHistory = []", + "}", + "const creditDate = new Date(request.headers.date)", + "const transaction = {", + " date: creditDate.getTime(),", + " transferId: requestBody.transferId,", + " amount: requestBody.amount,", + " currency: requestBody.currency,", + " from: {", + " idType: requestBody.from.idType,", + " idValue: requestBody.from.idValue", + " }", + "}", + "partyData.transactionHistory.push(transaction)", + "", + "custom.pushMessage({ transaction: transaction, newBalance: partyData.balance , transactionHistory: partyData.transactionHistory }, toPartyId)" ], "scriptingEngine": "javascript" } From 03558b965d157f0acedbc5307dfc4784de0c4022 Mon Sep 17 00:00:00 2001 From: Sridevi Miriyala <38143240+sri-miriyala@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:01:23 -0400 Subject: [PATCH 24/39] Feat/#csi 25 ttk for proxy simulation (#153) * Added missing entries * GP changes to test as_payer and as_payee * Updates for more scenarios * Updates * Added tests for proxy+fxp combination * Updates for proxy+fx collections * refactoring of collection folders * Updated the folder structure * Added more folder structure * refactoring of gp collections * fix: fix file name * Restructuring of provisioning folders * Added logic to onboard proxyttk * refactor: organize mojaloop provisioning files * fix: update fx and proxy provisioning env * fix: fix mojaloop provisioning ordering * Updated env files * Updates for negative scenarios * Updated negative testcases for quotes * Added negative case rule for quote * Commented tests not needed * Updates to transfers request * Added negative test case for transfers * Updates to as_payee discovery collection * disbled tests not needed * fix: fix order for gp p2p * fix: fixes for proxy as payer tests * fix: fixes for proxy as payee tests * Updates for quotes * Merged proxy rules into main rules section * fix: fixes for fx errors and fx settlement collections * fix: add retry logic to payee_abort v1.1 * fix: fix active inactive accounts assertion * Updates for payee collection * Cleaned up collection * removed tests not for transfers * chore: refactor file structure * Added quotes to transfers request * Updated ilpPacket from Quotes response * Updates for as payer tests * Removed duplicate rules * fix: fix rule header for ttkpayeefsp * Updates for payee * fix: fx tests * feat: change rules path * fix: fx testcase * fix: fx test * Uploading latest set of rules * Updates rules for negative scenarios * renamed folders * Restructured Tests * Removed proxy folder from rules after the merge * Updated Validation rules * feat: added get fxtransfers * fix: fx tests * Updated payer id * Updated env vars * Updates for quotes errors * Updates for quotes payee fsp error * fix: fix main gp test * fix: fix main gp put transfer rule * fix: few fixes * chore: refactor * fix: fx tests * fix: rules and testcases * fix: testcase * chore: tests * chore: added callback rule invalid fulfilment * chore: fxTransfers invalid fulfilment * fix: rule * fix: rule * fix: tests * feat: add rule * fix: tests * fix: naming * Updated negative test cases for as_payee_scheme * Updates * Updates for proxy onboarding * feat: add rules * fix: test case * fix: timeout test case * fix: fx target amount should match the transfer * fix: fixes for interscheme gp (#157) * feat: add transfer response rule * feat: update rules * fix: removen unneeded rule * fix: fix error code for id not found * fix: fix test title * fix: add missing case --------- Co-authored-by: Steven Oderayi Co-authored-by: Vijay Co-authored-by: Kalin Krustev --- .../provisioning/proxy_testing/proxy1.json | 1376 ++++++++++++ .../provisioning/proxy_testing/proxy2.json | 1376 ++++++++++++ .../provisioning/proxy_testing/testdfsp.json | 1427 ++++++++++++ .../fx_golden_path/api_tests/fx_quotes.json | 77 - .../api_tests/fx_transfers.json | 83 - .../duplicate_handling/duplicate_test.json | 877 -------- .../negative_scenarios/fxp_error.json | 1996 ----------------- .../fxp_payee_invalid_fulfillment.json | 660 ------ .../fxp_quote_validity_expired.json | 1429 ------------ .../negative_scenarios/timeout_scenarios.json | 1625 -------------- .../bug fixes/other-bug-fixes.json | 4 +- ...ve_and_inactive_participants_accounts.json | 8 +- .../payee_abort_v1.1.json | 46 +- .../fx/api_schema_validation/fx_quotes.json | 189 ++ .../api_schema_validation/fx_transfers.json | 273 +++ .../fx/api_schema_validation/master.json | 12 + .../duplicate_fx_transfers.json} | 543 +++-- .../feature_tests/happy_path/fx_tests.json | 498 ++-- .../golden_path/fx/feature_tests/master.json | 20 + .../negative_scenarios/fxp_error.json} | 558 ++--- .../fxp_invalid_fulfillment.json | 497 ++++ .../negative_scenarios/master.json | 20 + .../payee_invalid_fulfillment.json | 497 ++++ .../negative_scenarios/timeout_scenarios.json | 654 ++++++ .../settlement/settlement_tests.json | 1156 +++++----- collections/hub/golden_path/fx/master.json | 12 + collections/hub/golden_path/master.json | 95 +- .../as_payee_scheme/happy_path/discovery.json | 96 + .../as_payee_scheme/happy_path/quotes.json | 409 ++++ .../as_payee_scheme/happy_path/transfers.json | 249 ++ .../negative_scenarios/discovery.json | 60 + .../negative_scenarios/quotes.json | 87 + .../negative_scenarios/transfers.json | 78 + .../as_payer_scheme/happy_path/discovery.json | 142 ++ .../as_payer_scheme/happy_path/quotes.json | 177 ++ .../as_payer_scheme/happy_path/transfers.json | 247 ++ .../negative_scenarios/discovery.json | 764 +++++++ .../negative_scenarios/quotes.json | 392 +--- .../negative_scenarios/transfers.json | 239 ++ collections/hub/master.json | 18 +- ...sers-to-new-sims-and-als-registration.json | 0 .../adjust-participants-limits.json | 0 .../CGS_Specific/master.json | 0 .../CGS_Specific/oracle-onboarding.json | 0 .../MojaloopHub_Setup/hub.json | 0 .../MojaloopSims_Onboarding/master.json | 0 .../noresponsepayeefsp.json | 0 .../MojaloopSims_Onboarding/payeefsp.json | 0 .../MojaloopSims_Onboarding/payerfsp.json | 0 .../MojaloopSims_Onboarding/testfsp1.json | 0 .../MojaloopSims_Onboarding/testfsp2.json | 0 .../MojaloopSims_Onboarding/testfsp3.json | 0 .../MojaloopSims_Onboarding/testfsp4.json | 0 .../testingtoolkitdfsp.json | 312 ++- .../MojaloopSims_Onboarding/ttkfxp1.json | 1460 ++++++++++++ .../MojaloopSims_Onboarding/ttkfxpayee.json | 1142 ++++++++++ .../MojaloopSims_Onboarding/ttkfxpayer.json | 1368 +++++++++++ .../MojaloopSims_Onboarding/ttkpayeefsp.json | 110 + .../{ => for_golden_path}/master.json | 0 .../for_sdk_bulk}/master.json | 0 .../for_sdk_bulk}/ttksim1.json | 8 +- .../for_sdk_bulk}/ttksim2.json | 2 +- .../for_sdk_bulk}/ttksim3.json | 2 +- .../for_thirdparty}/centralauth.json | 0 .../for_thirdparty}/dfspa.json | 0 .../for_thirdparty}/dfspb.json | 0 .../for_thirdparty}/dfspb_parties.json | 0 .../for_thirdparty}/hub.json | 0 .../for_thirdparty}/master.json | 0 .../for_thirdparty}/pisp.json | 0 .../new_participants/new_dfsp.json} | 6 +- .../new_participants/new_fxp.json} | 0 .../happy_path/sdk_fx_transfer.json | 0 .../negative_scenarios/fxp_error.json | 0 .../fxp_non_success_states.json | 0 .../fxp_timeout_scenarios.json | 0 .../p2p/sdk_post_transfer.json | 0 .../proxy/fxp/sdk_post_transfer.json | 190 ++ .../happy_path/discovery.json | 326 --- .../proxy_golden_path/happy_path/quotes.json | 816 ------- .../negative_scenarios/discovery.json | 727 ------ environments/hub.json | 5 +- environments/hub/forex/fxp-env.json | 30 + environments/hub/proxy/onboard_proxy_ttk.json | 19 + .../proxy/proxy_env_as_payee.json} | 31 +- .../hub/proxy/proxy_env_as_payer.json | 76 + .../pm4ml/proxy/fxp/proxy-fxp-env.json | 27 + .../rules_callback/default.json | 525 ++++- .../rules_response/default.json | 0 rules/hub/rules_validation/default.json | 1262 +++++++++++ .../spec_files/rules_validation/default.json | 1 - .../forex/rules_sync_response/default.json | 550 +++++ .../fxp_response_rules.json | 0 .../proxy/rules_sync_response/default.json | 550 +++++ 94 files changed, 18080 insertions(+), 10431 deletions(-) create mode 100644 collections/dfsp/provisioning/proxy_testing/proxy1.json create mode 100644 collections/dfsp/provisioning/proxy_testing/proxy2.json create mode 100644 collections/dfsp/provisioning/proxy_testing/testdfsp.json delete mode 100644 collections/hub/fx_golden_path/api_tests/fx_quotes.json delete mode 100644 collections/hub/fx_golden_path/api_tests/fx_transfers.json delete mode 100644 collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json delete mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json delete mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json delete mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json delete mode 100644 collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json create mode 100644 collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json create mode 100644 collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json create mode 100644 collections/hub/golden_path/fx/api_schema_validation/master.json rename collections/hub/{fx_golden_path/feature_tests/happy_path/get_fx_transfers.json => golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json} (63%) rename collections/hub/{fx_golden_path => golden_path/fx}/feature_tests/happy_path/fx_tests.json (75%) create mode 100644 collections/hub/golden_path/fx/feature_tests/master.json rename collections/hub/{fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json => golden_path/fx/feature_tests/negative_scenarios/fxp_error.json} (62%) create mode 100644 collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json create mode 100644 collections/hub/golden_path/fx/feature_tests/negative_scenarios/master.json create mode 100644 collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json create mode 100644 collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json rename collections/hub/{fx_golden_path => golden_path/fx}/feature_tests/settlement/settlement_tests.json (59%) create mode 100644 collections/hub/golden_path/fx/master.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json create mode 100644 collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json create mode 100644 collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json create mode 100644 collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json create mode 100644 collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json create mode 100644 collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json rename collections/{proxy/proxy_golden_path => hub/inter_scheme/as_payer_scheme}/negative_scenarios/quotes.json (64%) create mode 100644 collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json rename collections/hub/provisioning/{ => for_golden_path}/CGS_Specific/add-users-to-new-sims-and-als-registration.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/CGS_Specific/adjust-participants-limits.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/CGS_Specific/master.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/CGS_Specific/oracle-onboarding.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopHub_Setup/hub.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/master.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/noresponsepayeefsp.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/payeefsp.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/payerfsp.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/testfsp1.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/testfsp2.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/testfsp3.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/testfsp4.json (100%) rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/testingtoolkitdfsp.json (91%) create mode 100644 collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json create mode 100644 collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json create mode 100644 collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json rename collections/hub/provisioning/{ => for_golden_path}/MojaloopSims_Onboarding/ttkpayeefsp.json (90%) rename collections/hub/provisioning/{ => for_golden_path}/master.json (100%) rename collections/hub/{provisioning_sdkbulk => provisioning/for_sdk_bulk}/master.json (100%) rename collections/hub/{provisioning_sdkbulk => provisioning/for_sdk_bulk}/ttksim1.json (99%) rename collections/hub/{provisioning_sdkbulk => provisioning/for_sdk_bulk}/ttksim2.json (99%) rename collections/hub/{provisioning_sdkbulk => provisioning/for_sdk_bulk}/ttksim3.json (99%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/centralauth.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/dfspa.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/dfspb.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/dfspb_parties.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/hub.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/master.json (100%) rename collections/hub/{provisioning_thirdparty => provisioning/for_thirdparty}/pisp.json (100%) rename collections/hub/{provisioning_dfsp/newdfsp.json => provisioning/new_participants/new_dfsp.json} (99%) rename collections/hub/{provisioning_fxp/newfxp.json => provisioning/new_participants/new_fxp.json} (100%) rename collections/pm4ml/{fx_golden_path => golden_path/forex}/feature_tests/happy_path/sdk_fx_transfer.json (100%) rename collections/pm4ml/{fx_golden_path => golden_path/forex}/feature_tests/negative_scenarios/fxp_error.json (100%) rename collections/pm4ml/{fx_golden_path => golden_path/forex}/feature_tests/negative_scenarios/fxp_non_success_states.json (100%) rename collections/pm4ml/{fx_golden_path => golden_path/forex}/feature_tests/negative_scenarios/fxp_timeout_scenarios.json (100%) rename collections/pm4ml/{ => golden_path}/p2p/sdk_post_transfer.json (100%) create mode 100644 collections/pm4ml/golden_path/proxy/fxp/sdk_post_transfer.json delete mode 100644 collections/proxy/proxy_golden_path/happy_path/discovery.json delete mode 100644 collections/proxy/proxy_golden_path/happy_path/quotes.json delete mode 100644 collections/proxy/proxy_golden_path/negative_scenarios/discovery.json create mode 100644 environments/hub/forex/fxp-env.json create mode 100644 environments/hub/proxy/onboard_proxy_ttk.json rename environments/{proxy_env.json => hub/proxy/proxy_env_as_payee.json} (50%) create mode 100644 environments/hub/proxy/proxy_env_as_payer.json create mode 100644 environments/pm4ml/proxy/fxp/proxy-fxp-env.json rename rules/{mojaloop/ml-testing-toolkit/spec_files => hub}/rules_callback/default.json (78%) rename rules/{mojaloop/ml-testing-toolkit/spec_files => hub}/rules_response/default.json (100%) create mode 100644 rules/hub/rules_validation/default.json delete mode 100644 rules/mojaloop/ml-testing-toolkit/spec_files/rules_validation/default.json create mode 100644 rules/pm4ml/forex/rules_sync_response/default.json rename rules/pm4ml/{ => forex/rules_sync_response}/fxp_response_rules.json (100%) create mode 100644 rules/pm4ml/proxy/rules_sync_response/default.json diff --git a/collections/dfsp/provisioning/proxy_testing/proxy1.json b/collections/dfsp/provisioning/proxy_testing/proxy1.json new file mode 100644 index 00000000..a460407e --- /dev/null +++ b/collections/dfsp/provisioning/proxy_testing/proxy1.json @@ -0,0 +1,1376 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Setup Accounts and Limits", + "meta": { + "info": "DFSP account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP" + }, + "description": "Add DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PROXY1_DFSP_ID}", + "currency": "{$inputs.currency}", + "isProxy": true + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits - DFSP" + }, + "description": "Add initial position and limits - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "DFSP Get Status Request before deposit" + }, + "description": "DFSP Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - DFSP" + }, + "description": "Deposit Funds in Settlement Account - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/accounts/{$environment.dfspSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}", + "id": "{$environment.dfspSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "DFSP Get Status Request after deposit" + }, + "description": "DFSP Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "DFSP Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspSettlementAccountBalanceBeforeFundsIn - +environment.dfspfundsInPrepareAmount)" + ] + } + ] + }, + "delay": "1000", + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 2, + "name": "Setup Callback Endpoints", + "meta": { + "info": "DFSP callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP callback - AUTHORIZATIONS" + }, + "description": "Add DFSP callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT" + }, + "description": "Add DFSP callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add DFSP callback - PARTIES GET" + }, + "description": "Add DFSP callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add DFSP callback - PARTIES PUT" + }, + "description": "Add DFSP callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add DFSP callback - PARTIES PUT Error" + }, + "description": "Add DFSP callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add DFSP callback - QUOTES" + }, + "description": "Add DFSP callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add DFSP callback - TXN REQUEST" + }, + "description": "Add DFSP callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add DFSP callback - TRANSFERS POST" + }, + "description": "Add DFSP callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add DFSP callback - TRANSFERS PUT" + }, + "description": "Add DFSP callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add DFSP callback - TRANSFERS ERROR" + }, + "description": "Add DFSP callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER POST" + }, + "description": "Add DFSP callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER PUT" + }, + "description": "Add DFSP callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER ERROR" + }, + "description": "Add DFSP callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID GET" + }, + "description": "Add DFSP callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 3, + "name": "Setup Notification Emails", + "meta": { + "info": "DFSP notification_emails" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY1_DFSP_ID}" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY1_DFSP_ID}" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + } + ] +} \ No newline at end of file diff --git a/collections/dfsp/provisioning/proxy_testing/proxy2.json b/collections/dfsp/provisioning/proxy_testing/proxy2.json new file mode 100644 index 00000000..1dd6b4fb --- /dev/null +++ b/collections/dfsp/provisioning/proxy_testing/proxy2.json @@ -0,0 +1,1376 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Setup Accounts and Limits", + "meta": { + "info": "DFSP account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP" + }, + "description": "Add DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PROXY2_DFSP_ID}", + "currency": "{$inputs.currency}", + "isProxy": true + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits - DFSP" + }, + "description": "Add initial position and limits - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "DFSP Get Status Request before deposit" + }, + "description": "DFSP Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - DFSP" + }, + "description": "Deposit Funds in Settlement Account - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/accounts/{$environment.dfspSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}", + "id": "{$environment.dfspSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "DFSP Get Status Request after deposit" + }, + "description": "DFSP Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "DFSP Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspSettlementAccountBalanceBeforeFundsIn - +environment.dfspfundsInPrepareAmount)" + ] + } + ] + }, + "delay": "1000", + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 2, + "name": "Setup Callback Endpoints", + "meta": { + "info": "DFSP callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP callback - AUTHORIZATIONS" + }, + "description": "Add DFSP callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT" + }, + "description": "Add DFSP callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add DFSP callback - PARTIES GET" + }, + "description": "Add DFSP callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add DFSP callback - PARTIES PUT" + }, + "description": "Add DFSP callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add DFSP callback - PARTIES PUT Error" + }, + "description": "Add DFSP callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add DFSP callback - QUOTES" + }, + "description": "Add DFSP callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add DFSP callback - TXN REQUEST" + }, + "description": "Add DFSP callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add DFSP callback - TRANSFERS POST" + }, + "description": "Add DFSP callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add DFSP callback - TRANSFERS PUT" + }, + "description": "Add DFSP callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add DFSP callback - TRANSFERS ERROR" + }, + "description": "Add DFSP callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER POST" + }, + "description": "Add DFSP callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER PUT" + }, + "description": "Add DFSP callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER ERROR" + }, + "description": "Add DFSP callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.PROXY1_CALLBACK_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID GET" + }, + "description": "Add DFSP callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.PROXY1_CALLBACK_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.PROXY1_CALLBACK_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 3, + "name": "Setup Notification Emails", + "meta": { + "info": "DFSP notification_emails" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY2_DFSP_ID}" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY2_DFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY2_DFSP_ID}" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + } + ] +} \ No newline at end of file diff --git a/collections/dfsp/provisioning/proxy_testing/testdfsp.json b/collections/dfsp/provisioning/proxy_testing/testdfsp.json new file mode 100644 index 00000000..5bec6d98 --- /dev/null +++ b/collections/dfsp/provisioning/proxy_testing/testdfsp.json @@ -0,0 +1,1427 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Setup Accounts and Limits", + "meta": { + "info": "DFSP account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP" + }, + "description": "Add DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits - DFSP" + }, + "description": "Add initial position and limits - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "DFSP Get Status Request before deposit" + }, + "description": "DFSP Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - DFSP" + }, + "description": "Deposit Funds in Settlement Account - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/accounts/{$environment.dfspSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}", + "id": "{$environment.dfspSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "DFSP Get Status Request after deposit" + }, + "description": "DFSP Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "DFSP Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspSettlementAccountBalanceBeforeFundsIn - +environment.dfspfundsInPrepareAmount)" + ] + } + ] + }, + "delay": "1000", + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 2, + "name": "Setup Callback Endpoints", + "meta": { + "info": "DFSP callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP callback - AUTHORIZATIONS" + }, + "description": "Add DFSP callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT" + }, + "description": "Add DFSP callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add DFSP callback - PARTIES GET" + }, + "description": "Add DFSP callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add DFSP callback - PARTIES PUT" + }, + "description": "Add DFSP callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add DFSP callback - PARTIES PUT Error" + }, + "description": "Add DFSP callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add DFSP callback - QUOTES" + }, + "description": "Add DFSP callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add DFSP callback - TXN REQUEST" + }, + "description": "Add DFSP callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add DFSP callback - TRANSFERS POST" + }, + "description": "Add DFSP callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add DFSP callback - TRANSFERS PUT" + }, + "description": "Add DFSP callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add DFSP callback - TRANSFERS ERROR" + }, + "description": "Add DFSP callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER POST" + }, + "description": "Add DFSP callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER PUT" + }, + "description": "Add DFSP callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER ERROR" + }, + "description": "Add DFSP callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID GET" + }, + "description": "Add DFSP callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 3, + "name": "Setup Notification Emails", + "meta": { + "info": "DFSP notification_emails" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_ID}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning_dfsp/newdfsp.json" + } + }, + { + "id": 4, + "type": "Oracle Onboarding", + "name": "Oracle Onboarding", + "requests": [ + { + "id": 1, + "meta": { + "info": "Register MSISDN Oracle" + }, + "description": "Register MSISDN Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "url": "{$inputs.HOST_ORACLE}", + "operationPath": "/participants/{Type}/{ID}", + "method": "post", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "body": { + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 or errorCode 2001 already exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.body.errorInformation.errorCode).to.equal(\"2001\")", + "} else {", + " expect(response.status).to.equal(200)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/MojaloopHub_Setup/hub.json" + } + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/api_tests/fx_quotes.json b/collections/hub/fx_golden_path/api_tests/fx_quotes.json deleted file mode 100644 index 9c578a09..00000000 --- a/collections/hub/fx_golden_path/api_tests/fx_quotes.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "options": {}, - "name": "fx_quotes", - "test_cases": [ - { - "id": 1, - "name": "FX Quote - 400", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Quote - 400" - }, - "requests": [ - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SENDING", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - } - ] - } - } - ] - } - ] - } - \ No newline at end of file diff --git a/collections/hub/fx_golden_path/api_tests/fx_transfers.json b/collections/hub/fx_golden_path/api_tests/fx_transfers.json deleted file mode 100644 index 36464923..00000000 --- a/collections/hub/fx_golden_path/api_tests/fx_transfers.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "options": {}, - "name": "fx_transfer_400", - "test_cases": [ - { - "id": 1, - "name": "FX Transfer - 400", - "fileInfo": { - "path": "collections/tests/fx/fx_transfers.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Transfer - 400" - }, - "requests": [ - { - "id": 6, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "X@#^", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "condition", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json b/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json deleted file mode 100644 index 8750a37e..00000000 --- a/collections/hub/fx_golden_path/feature_tests/duplicate_handling/duplicate_test.json +++ /dev/null @@ -1,877 +0,0 @@ -{ - "options": {}, - "name": "collections_tests_fx_fx_tests", - "test_cases": [ - { - "id": 1, - "name": "FX Transfer", - "fileInfo": { - "path": "collections/tests/fx/duplicate_test.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Transfer" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 7, - "description": "POST /transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/transfers", - "path": "/transfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" - }, - "ilpPacket": "{$prev.5.callback.body.ilpPacket}", - "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "headers": { - "Accept": "{$inputs.acceptTransfers}", - "Content-Type": "{$inputs.contentTypeTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "disabled": false, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback transferState to be COMMITTED", - "exec": [ - "expect(callback.body.transferState).to.equal('COMMITTED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be transfers", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 8, - "description": "Capture FXP position before duplicate fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance before Duplicate FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance before Duplicate FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer}`);" - ] - } - } - }, - { - "id": 9, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 10, - "description": "Check FXP position after duplicate fxTransfer. It should be same as before duplicate fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance after Duplicate FxTransfer=${environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance after Duplicate FxTransfer=${environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer}`);" - ] - } - }, - "tests" :{ - "assertions": [ - { - "id": 1, - "description": "Payer position should not be changed", - "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterDuplicateFxTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeDuplicateFxTransfer)", - "", - "expect(environment.fxpTargetCurrencyPositionBalanceAfterDuplicateFxTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeDuplicateFxTransfer)" - ] - } - ] - } - } - ] - } - ] -} diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json deleted file mode 100644 index 5fdb6791..00000000 --- a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json +++ /dev/null @@ -1,1996 +0,0 @@ -{ - "options": {}, - "name": "fxp_error", - "test_cases": [ - { - "id": 1, - "name": "FX Quote - Error scenario", - "fileInfo": { - "path": "collections/tests/fx/golden_path/feature_tests/fxp_error.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 3, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 4, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}", - "extensionList": { - "extension": [ - { - "key": "502", - "value": "trigger error for fxQuotes" - } - ] - } - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain errorInformation code", - "exec": [ - "expect(callback.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback body should contain errorInformation description", - "exec": [ - "expect(callback.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$prev.4.request.body.conversionTerms.conversionId}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - } - ] - }, - { - "id": 2, - "name": "FX Transfer - Error Scenario", - "fileInfo": { - "path": "collections/tests/fx/fx_error.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "Get Accounts for Payer BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", - "method": "get", - "params": { - "name": "{$inputs.fromFspId}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - "", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", - "", - "" - ] - } - } - }, - { - "id": 7, - "description": "Get Accounts for Payee BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", - "" - ] - } - } - }, - { - "id": 8, - "description": "Get Accounts for FXP BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" - ] - } - } - }, - { - "id": 9, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "1001" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for fxTransfers" - } - ] - } - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain errorInformation code", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback body should contain errorInformation description", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - }, - { - "id": 3, - "name": "Fx Transfer - success; Regular Transfer - error", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /transfers returns PUT /transfers/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "Get Accounts for Payer BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FX_PAYERDFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FX_PAYERDFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - "", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", - "", - "" - ] - } - } - }, - { - "id": 2, - "description": "Get Accounts for Payee BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FX_PAYEEDFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FX_PAYEEDFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", - "" - ] - } - } - }, - { - "id": 3, - "description": "Get Accounts for FXP BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" - ] - } - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "Get Accounts for Payer BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", - "method": "get", - "params": { - "name": "{$inputs.fromFspId}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - "", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", - "", - "" - ] - } - } - }, - { - "id": 7, - "description": "Get Accounts for Payee BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", - "" - ] - } - } - }, - { - "id": 8, - "description": "Get Accounts for FXP BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" - ] - } - } - }, - { - "id": 9, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for fxTransfers" - } - ] - } - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 13, - "description": "POST /transfer that triggers an error", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/transfers", - "path": "/transfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "body": { - "transferId": "{$prev.9.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "amount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "1001" - }, - "ilpPacket": "{$prev.5.callback.body.ilpPacket}", - "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "headers": { - "Accept": "{$inputs.acceptTransfers}", - "Content-Type": "{$inputs.contentTypeTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "disabled": false, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback should have error code", - "exec": [ - "expect(callback.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback should have error description", - "exec": [ - "expect(callback.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 6, - "description": "Get Accounts for Payer AFTER transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FX_PAYERDFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FX_PAYERDFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceAfterTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" - ] - } - }, - "tests" :{ - "assertions": [ - { - "id": 1, - "description": "Payer position should not be changed", - "exec": [ - "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" - ] - } - ] - } - }, - { - "id": 7, - "description": "Get Accounts for Payee AFTER transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FX_PAYEEDFSP_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FX_PAYEEDFSP_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests" :{ - "assertions": [ - { - "id": 1, - "description": "FXP position should not be changed", - "exec": [ - "expect(environment.fxpPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" - ] - } - ] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payeePositionBalanceAfterTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", - "", - "" - ] - } - } - }, - { - "id": 8, - "description": "Get Accounts for FXP AFTER transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "FXP Source currency position should be changed", - "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" - ] - }, - { - "id": 2, - "description": "FXP Target currency position should be changed", - "exec": [ - "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" - ] - } - ] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", - " }", - "})", - "", - "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", - "", - "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", - "", - "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", - "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" - ] - } - } - } - ] - } - ] - } - \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json deleted file mode 100644 index d1e44e4d..00000000 --- a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_payee_invalid_fulfillment.json +++ /dev/null @@ -1,660 +0,0 @@ -{ - "options": {}, - "name": "fxp_payee_invalid_fulfillment", - "test_cases": [ - { - "id": 1, - "name": "Check that positions for FXP, Payer and Payee are not changed after FXTransfer fails with invalid fulfillment", - "fileInfo": { - "path": "collections/tests/fx/golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /transfers returns PUT /transfers/{ID} with invalid fulfillment" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 7, - "description": "POST /transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/transfers", - "path": "/transfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" - }, - "ilpPacket": "{$prev.5.callback.body.ilpPacket}", - "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "headers": { - "Accept": "{$inputs.acceptTransfers}", - "Content-Type": "{$inputs.contentTypeTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "disabled": false, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback transferState to be COMMITTED", - "exec": [ - "expect(callback.body.transferState).to.equal('COMMITTED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be transfers", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - } - - ] - } - \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json deleted file mode 100644 index 46e9cf83..00000000 --- a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_quote_validity_expired.json +++ /dev/null @@ -1,1429 +0,0 @@ -{ - "options": {}, - "name": "fxp_quote_expired", - "test_cases": [ - { - "id": 1, - "name": "Send POST /quotes after expiry of the fxQuote", - "fileInfo": { - "path": "collections/tests/fx/golden_path/feature_tests/fxp_error.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 3, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 4, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 2, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for fxQuotes" - } - ] - } - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 9, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - }, - { - "id": 10, - "description": "Callback body should contain expiration", - "exec": [ - "expect(callback.body.conversionTerms.expiration).to.equal('{$request.body.conversionTerms.expiration}')" - ] - - } - ] - } - }, - { - "id": 5, - "description": "Send POST /quotes after expiration in PUT /fxQuotes/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", - "await custom.sleep(maxRetryWait)" - ] - } - } - } - ] - }, - { - "id": 2, - "name": "Send POST /fxTransfers after expiry of the fxQuote", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 2, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 3, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for fxTransfers" - } - ] - } - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain errorInformation code", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback body should contain errorInformation description", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - }, - { - "id": 3, - "name": "FX Transfer - error", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "POST /transfers returns PUT /transfers/{ID}/error" - }, - "requests": [ - { - "id": 1, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 2, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 3, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 5, - "description": "POST /transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/transfers", - "path": "/transfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" - }, - "ilpPacket": "{$prev.5.callback.body.ilpPacket}", - "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for transfers" - } - ] - } - }, - "headers": { - "Accept": "{$inputs.acceptTransfers}", - "Content-Type": "{$inputs.contentTypeTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "disabled": false, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain errorInformation code", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback body should contain errorInformation description", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 5, - "description": "Check position for FXP. It should be same as before the transfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/participants/{name}/positions", - "path": "/participants/{$inputs.payeefsp}/positions", - "method": "get", - "params": { - "name": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" - }, - "ilpPacket": "{$prev.5.callback.body.ilpPacket}", - "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}", - "extensionList": { - "extension": [ - { - "key": "error", - "value": "trigger error for transfers" - } - ] - } - }, - "disabled": false, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain errorInformation code", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorCode')" - ] - }, - { - "id": 6, - "description": "Callback body should contain errorInformation description", - "exec": [ - "expect(response.body.errorInformation).to.have.property('errorDescription')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - } - ] - } - \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json b/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json deleted file mode 100644 index 4a9a221f..00000000 --- a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/timeout_scenarios.json +++ /dev/null @@ -1,1625 +0,0 @@ -{ - "options": {}, - "name": "timeout_scenarios", - "test_cases": [ - { - "id": 1, - "name": "FX Quote - timeout scenario for FXP Quotes", - "fileInfo": { - "path": "collections/tests/fx/timeout_scenarios.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Quotes - timeout scenario" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}", - "extensionList" : { - "extension" : [ - { - "key": "2002", - "value": "FXP_QUOTES_TIMEOUT" - } - ] - } - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - } - ] - }, - { - "id": 2, - "name": "FX Transfer - timeout scenario for EXPIRED_PREPARED", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Transfer - timeout scenario" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "Get Accounts for FXP BEFORE fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", - " }", - "})", - "", - "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", - "", - "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" - ] - } - } - }, - { - "id": 7, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "1000" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 8, - "description": "Get Accounts for FXP AFTER fxTransfer", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin", - "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" - }, - "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", - "method": "get", - "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Payer position should be changed", - "exec": [ - "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" - ] - }, - { - "id": 2, - "description": "Payee position should be changed", - "exec": [ - "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" - ] - }, - { - "id": 3, - "description": "FXP Source currency position should be changed", - "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" - ] - }, - { - "id": 4, - "description": "FXP Target currency position should be changed", - "exec": [ - "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" - ] - } - ] - }, - "disabled": false, - "scripts": { - "postRequest": { - "exec": [ - "var res = response.body;", - "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer= curAccount.value", - " }", - "})", - "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", - " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer= curAccount.value", - " }", - "})", - "", - "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer}`);", - "", - "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer}`);", - "", - "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", - "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" - ] - } - } - } - ] - }, - { - "id": 3, - "name": "FX Transfer - timeout scenario for RESERVED_TIMEOUT", - "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", - "labels": [ - "fx" - ] - }, - "meta": { - "info": "FX Transfer - timeout scenario" - }, - "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, - { - "id": 4, - "description": "POST /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxQuotes", - "path": "/fxQuotes", - "method": "post", - "body": { - "conversionRequestId": "{$function.generic.generateUUID}", - "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "expiration": "{$inputs.FXP_EXPIRATION}" - } - }, - "headers": { - "Accept": "{$inputs.acceptFxQuotes}", - "Content-Type": "{$inputs.contentTypeFxQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain conversionTerms", - "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", - "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" - ] - } - ] - } - }, - { - "id": 5, - "description": "POST /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/quotes", - "path": "/quotes", - "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - } - }, - { - "id": 6, - "description": "POST /fxTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers", - "path": "/fxTransfers", - "method": "post", - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "body": { - "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", - "amountType": "SEND", - "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" - }, - "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" - }, - "condition": "{$prev.4.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, - { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", - "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - }, - { - "id": 7, - "description": "GET /fxTransfers/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/fxTransfers/{ID}", - "path": "/fxTransfers/{$prev.4.callback.body.conversionTerms.conversionId}", - "method": "get", - "params": { - "ID": "{$prev.4.callback.body.conversionTerms.conversionId}" - }, - "url": "{$inputs.HOST_ML_API_ADAPTER}", - "headers": { - "Accept": "{$inputs.acceptFxTransfers}", - "Content-Type": "{$inputs.contentTypeFxTransfers}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" - }, - "scriptingEngine": "javascript", - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED_TIMEOUT", - "exec": [ - "expect(callback.body.transferState).to.equal('RESERVED_TIMEOUT')" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ] - } - } - } - ] - } - ] - } - \ No newline at end of file diff --git a/collections/hub/golden_path/bug fixes/other-bug-fixes.json b/collections/hub/golden_path/bug fixes/other-bug-fixes.json index f6491d0c..0a31f246 100644 --- a/collections/hub/golden_path/bug fixes/other-bug-fixes.json +++ b/collections/hub/golden_path/bug fixes/other-bug-fixes.json @@ -193,9 +193,9 @@ }, { "id": 3, - "description": "Error code is 3100", + "description": "Error code is 3200", "exec": [ - "expect(environment.payercallbackx.data.errorInformation.errorCode).to.equal('3100');" + "expect(environment.payercallbackx.data.errorInformation.errorCode).to.equal('3200');" ] } ] diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index 097fc99f..c4443b19 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -442,19 +442,19 @@ }, { "id": 12, - "description": "Payer side Callback Body - errorCode is 3100", + "description": "Payer side Callback Body - errorCode is 3200", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.data.errorInformation['errorCode']).to.equal('3100')", + " expect(requestVariables.sim1Callback.data.errorInformation['errorCode']).to.equal('3200')", "}" ] }, { "id": 13, - "description": "Payer side Callback Body - Error Description is Generic validation error", + "description": "Payer side Callback Body - Error Description is Generic ID not found", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic validation error - Participant')", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic ID not found - Payer proxy or payee proxy not found')", "}" ] } diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index fbd5a9b0..ff37650f 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -536,7 +536,51 @@ "postRequest": { "exec": [ "", - "" + "// lets get retry config", + "const maxRetryCount = Number.parseFloat(environment.RETRY_MAX_ATTEMPTS) || 20", + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "", + "async function main() {", + " const expectedBalance = +environment[environment.fromFspId + 'PositionBeforePrepare']", + "", + " let _response = response", + "", + " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", + " ", + " const isOk = +response.body?.[0]?.value === expectedBalance;", + " ", + " if (isOk) {", + " console.log(`Everything is OK, let's continue`)", + " response = _response", + " break;", + " } else {", + " console.log(`Everything is NOT OK, let's wait for ${maxRetryWait}ms, and try again...`)", + " await custom.sleep(maxRetryWait)", + " const axiosRes = await makeRequest()", + " _response = { code: axiosRes.status, status: axiosRes.statusText, body: axiosRes.data }", + " console.log(`retryCount: ${retryCount+1} - value: `, axiosRes.data?.[0]?.value)", + " }", + " }", + "}", + "", + "async function makeRequest() {", + " const reqParams = {", + " method: 'get', ", + " url: `{$inputs.HOST_CENTRAL_LEDGER}/participants/{$inputs.fromFspId}/positions`,", + " headers: {", + " 'Content-Type': `{$inputs.contentTypeTransfers}`,", + " Accept: `{$inputs.acceptTransfers}`,", + " Date: `{$function.generic.curDate}`,", + " 'FSPIOP-Source': `{$inputs.fromFspId}`,", + " Authorization: `{$inputs.TTK_BEARER_TOKEN}`", + " }", + " };", + " ", + " return axios(reqParams);", + "}", + "", + "await main()" ] }, "preRequest": { diff --git a/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json b/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json new file mode 100644 index 00000000..4ee8cf6d --- /dev/null +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json @@ -0,0 +1,189 @@ +{ + "options": {}, + "name": "fx_quotes", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - 400", + "fileInfo": { + "path": "hub/golden_path/fx/api_schema_validation/fx_quotes.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Quote - 400" + }, + "requests": [ + { + "id": 4, + "description": "POST /fxQuotes - Invalid Amount Type", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "INVALID", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FX_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /fxQuotes - Invalid conversionRequestId", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "invalid", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}" + }, + "expiration": "{$inputs.FX_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + }, + { + "id": 6, + "description": "POST /fxQuotes - Invalid currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateUUID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "ABC" + }, + "expiration": "{$inputs.FX_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json b/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json new file mode 100644 index 00000000..ed5ceb17 --- /dev/null +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json @@ -0,0 +1,273 @@ +{ + "options": {}, + "name": "fx_transfer_400", + "test_cases": [ + { + "id": 1, + "name": "FX Transfer - 400", + "fileInfo": { + "path": "hub/golden_path/fx/api_schema_validation/fx_transfers.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer - 400" + }, + "requests": [ + { + "id": 6, + "description": "POST /fxTransfers Invalid determiningTransferId", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "invalid", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "condition": "{$inputs.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 7, + "description": "POST /fxTransfers Invalid commitRequestId", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "invalid", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "condition": "{$inputs.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 8, + "description": "POST /fxTransfers Invalid condition", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "condition": "condition", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers Invalid currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "ABC", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.amount}" + }, + "condition": "{$inputs.amount}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/api_schema_validation/master.json b/collections/hub/golden_path/fx/api_schema_validation/master.json new file mode 100644 index 00000000..84f4032e --- /dev/null +++ b/collections/hub/golden_path/fx/api_schema_validation/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "fx_quotes.json", + "type": "file" + }, + { + "name": "fx_transfers.json", + "type": "file" + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json b/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json similarity index 63% rename from collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json rename to collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json index 4a130644..6c3a0465 100644 --- a/collections/hub/fx_golden_path/feature_tests/happy_path/get_fx_transfers.json +++ b/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json @@ -1,12 +1,12 @@ { "options": {}, - "name": "collections_tests_fx_fx_tests", + "name": "hub_golden_path_fx_feature_tests_duplicate_handling_duplicate_fx_transfers", "test_cases": [ { "id": 1, - "name": "FX Transfer", + "name": "Duplicate fxTransfer", "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", + "path": "hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json", "labels": [ "fx" ] @@ -14,183 +14,8 @@ "meta": { "info": "FX Transfer" }, + "breakOnError": false, "requests": [ - { - "id": 1, - "description": "Add Participant to ALS", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true, - "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", - "method": "post", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "body": { - "fspId": "{$inputs.payeefsp}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", - "Accept": "{$inputs.acceptParticipants}", - "Content-Type": "{$inputs.contentTypeParticipants}", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 2, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - } - ] - } - }, { "id": 4, "description": "POST /fxQuotes", @@ -212,25 +37,26 @@ "conversionRequestId": "{$function.generic.generateUUID}", "conversionTerms": { "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, - "expiration": "{$inputs.FXP_EXPIRATION}" + "expiration": "{$inputs.FX_EXPIRATION}" } }, "headers": { "Accept": "{$inputs.acceptFxQuotes}", "Content-Type": "{$inputs.contentTypeFxQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "disabled": false, @@ -273,10 +99,10 @@ }, { "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", + "description": "Callback sourceAmount (amount & currency) to match the request", "exec": [ "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + "request.body.conversionTerms.sourceAmount.amount && expect(callback.body.conversionTerms.sourceAmount.amount).to.equal('{$request.body.conversionTerms.sourceAmount.amount}')" ] }, { @@ -299,8 +125,20 @@ "exec": [ "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" ] + }, + { + "id": 18, + "description": "Callback transferAmount (amount & currency)to match the request Copy", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] } ] + }, + "params": { + "Type": "", + "ID": "" } }, { @@ -325,18 +163,17 @@ "Accept": "{$inputs.acceptQuotes}", "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "transactionId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" + "fspId": "{$inputs.FX_PAYER_DFSP_ID}" }, "personalInfo": { "complexName": { @@ -348,15 +185,15 @@ }, "payee": { "partyIdInfo": { - "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + "partyIdType": "{$inputs.toIdType}", + "partyIdentifier": "{$inputs.FX_MSISDN_1}", + "fspId": "{$inputs.FX_PAYEE_DFSP_ID}" } }, "amountType": "SEND", "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -411,13 +248,6 @@ "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" ] }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, { "id": 9, "description": "Request transactionType scenario to be TRANSFER", @@ -444,6 +274,47 @@ }, { "id": 6, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 9, "description": "POST /fxTransfers", "apiVersion": { "minorVersion": 0, @@ -464,21 +335,22 @@ "Accept": "{$inputs.acceptFxTransfers}", "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "body": { "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "determiningTransferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "amount": "{$prev.4.callback.body.conversionTerms.sourceAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.sourceAmount.currency}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.currency}" }, "condition": "{$prev.4.callback.body.condition}", "expiration": "{$requestVariables.expiration}" @@ -503,58 +375,75 @@ }, { "id": 3, - "description": "Callback Content Length not 0", + "description": "Callback length not zero", "exec": [ "expect(callback.headers['Content-Length']).to.not.equal('0')" ] - }, - { - "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback conversionState to be RESERVED", - "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" - ] - }, - { - "id": 6, - "description": "Callback content-type to be fxTransfers", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" - ] - }, - { - "id": 8, - "description": "Callback body should contain fulfilment", - "exec": [ - "expect(callback.body).to.have.property('fulfilment')" - ] - }, + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "Get Accounts for Payer AFTER fx transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", + "id": 1, + "description": "Payer position should be changed", "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + "expect(environment.payerPositionBalanceAfterFxTransfer).to.not.equal(environment.payerPositionBalanceBeforeFxTransfer)" ] } ] }, "scripts": { - "preRequest": { + "postRequest": { "exec": [ - "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterFxTransfer}`);" ] } } }, { - "id": 7, + "id": 12, "description": "POST /transfer", "apiVersion": { "minorVersion": 0, @@ -572,22 +461,23 @@ "method": "post", "url": "{$inputs.HOST_ML_API_ADAPTER}", "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "transferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" + "currency": "{$prev.5.callback.body.transferAmount.currency}", + "amount": "{$prev.5.callback.body.transferAmount.amount}" }, "ilpPacket": "{$prev.5.callback.body.ilpPacket}", "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" + "expiration": "{$prev.5.callback.body.expiration}" }, "headers": { "Accept": "{$inputs.acceptTransfers}", "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "disabled": false, "scriptingEngine": "javascript", @@ -628,13 +518,6 @@ "expect(callback.body.transferState).to.equal('COMMITTED')" ] }, - { - "id": 6, - "description": "Callback content-type to be transfers", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" - ] - }, { "id": 9, "description": "Request FSP source the same as quote callback FSP destination", @@ -644,6 +527,9 @@ } ] }, + "params": { + "name": "" + }, "scripts": { "preRequest": { "exec": [ @@ -653,8 +539,8 @@ } }, { - "id": 8, - "description": "GET /fxTransfers/{ID}", + "id": 13, + "description": "Duplicate POST /fxTransfers with modified payload", "apiVersion": { "minorVersion": 0, "majorVersion": 2, @@ -666,18 +552,33 @@ "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" }, - "operationPath": "/fxTransfers/{ID}", - "path": "/fxTransfers/{$prev.4.callback.body.conversionTerms.conversionId}", - "method": "get", - "params": { - "ID": "{$prev.4.callback.body.conversionTerms.conversionId}" - }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", "url": "{$inputs.HOST_ML_API_ADAPTER}", "headers": { "Accept": "{$inputs.acceptFxTransfers}", "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$prev.9.request.body.commitRequestId}", + "determiningTransferId": "{$prev.9.request.body.determiningTransferId}", + "initiatingFsp": "{$prev.9.request.body.initiatingFsp}", + "counterPartyFsp": "{$prev.9.request.body.counterPartyFsp}", + "amountType": "{$prev.9.request.body.amountType}", + "sourceAmount": { + "amount": "{$prev.9.request.body.sourceAmount.amount}", + "currency": "{$prev.9.request.body.sourceAmount.currency}" + }, + "targetAmount": { + "amount": "{$prev.9.request.body.targetAmount.amount}", + "currency": "{$prev.9.request.body.targetAmount.currency}" + }, + "condition": "{$prev.9.request.body.condition}", + "expiration": "{$requestVariables.expiration}" }, "scriptingEngine": "javascript", "disabled": false, @@ -699,48 +600,110 @@ }, { "id": 3, - "description": "Callback Content Length not 0", + "description": "Callback length not zero", "exec": [ "expect(callback.headers['Content-Length']).to.not.equal('0')" ] }, { "id": 4, - "description": "Callback FSP Destination equal to request FSP Source", + "description": "Got errorInformation", "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + "expect(callback.body).to.have.property('errorInformation')" ] - }, + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 14, + "description": "Duplicate POST /fxTransfers with sam payload", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$prev.9.request.body.commitRequestId}", + "determiningTransferId": "{$prev.9.request.body.determiningTransferId}", + "initiatingFsp": "{$prev.9.request.body.initiatingFsp}", + "counterPartyFsp": "{$prev.9.request.body.counterPartyFsp}", + "amountType": "{$prev.9.request.body.amountType}", + "sourceAmount": { + "amount": "{$prev.9.request.body.sourceAmount.amount}", + "currency": "{$prev.9.request.body.sourceAmount.currency}" + }, + "targetAmount": { + "amount": "{$prev.9.request.body.targetAmount.amount}", + "currency": "{$prev.9.request.body.targetAmount.currency}" + }, + "condition": "{$prev.9.request.body.condition}", + "expiration": "{$prev.9.request.body.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ { - "id": 5, - "description": "Callback conversionState to be RESERVED", + "id": 1, + "description": "Response status to be 202", "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" + "expect(response.status).to.equal(202)" ] }, { - "id": 6, - "description": "Callback content-type to be fxTransfers", + "id": 2, + "description": "Response statusText be Accepted", "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + "expect(response.statusText).to.equal('Accepted')" ] }, { - "id": 8, - "description": "Callback body should contain fulfilment", + "id": 3, + "description": "Callback length not zero", "exec": [ - "expect(callback.body).to.have.property('fulfilment')" + "expect(callback.headers['Content-Length']).to.not.equal('0')" ] }, { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", + "id": 4, + "description": "Should get fulfilment same", "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + "expect(callback.body.fulfilment).to.equal('{$prev.9.callback.body.fulfilment}')" ] } ] }, + "params": { + "name": "" + }, "scripts": { "preRequest": { "exec": [ @@ -752,4 +715,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json similarity index 75% rename from collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json rename to collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json index 9f340932..00b4a0f1 100644 --- a/collections/hub/fx_golden_path/feature_tests/happy_path/fx_tests.json +++ b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json @@ -1,12 +1,12 @@ { "options": {}, - "name": "collections_tests_fx_fx_tests", + "name": "hub_golden_path_fx_feature_tests_happy_path_fx_tests", "test_cases": [ { "id": 1, - "name": "FX Transfer", + "name": "Happy Path FX E2E", "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", + "path": "hub/golden_path/fx/feature_tests/happy_path/fx_tests.json", "labels": [ "fx" ] @@ -14,6 +14,7 @@ "meta": { "info": "FX Transfer" }, + "breakOnError": false, "requests": [ { "id": 1, @@ -30,18 +31,18 @@ "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" }, "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.toIdType}/{$inputs.toIdValue}", + "path": "/participants/{$inputs.toIdType}/{$inputs.FX_MSISDN_1}", "method": "post", "params": { "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" + "ID": "{$inputs.FX_MSISDN_1}" }, "body": { - "fspId": "{$inputs.payeefsp}" + "fspId": "{$inputs.FX_PAYEE_DFSP_ID}" }, "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", "headers": { - "FSPIOP-Source": "{$inputs.toFspId}", + "FSPIOP-Source": "{$inputs.FX_PAYEE_DFSP_ID}", "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", "Accept": "{$inputs.acceptParticipants}", "Content-Type": "{$inputs.contentTypeParticipants}", @@ -57,11 +58,12 @@ ] } ] - } + }, + "disabled": false }, { "id": 2, - "description": "Get party info Copy", + "description": "Get party info", "apiVersion": { "minorVersion": 0, "majorVersion": 2, @@ -75,18 +77,18 @@ "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" }, "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", + "path": "/parties/MSISDN/{$inputs.FX_MSISDN_1}", "method": "get", "params": { "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" + "ID": "{$inputs.FX_MSISDN_1}" }, "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", "headers": { - "Content-Type": "{$inputs.contentType}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptParties}" }, "disabled": false, "tests": { @@ -124,68 +126,7 @@ "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", "exec": [ "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 3, - "description": "GET /services/FXP", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "prefix": "/v2", - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/services/FXP", - "path": "/services/FXP", - "method": "get", - "url": "{$inputs.HOST_FXP_SERVICES}", - "disabled": false, - "headers": { - "Content-Type": "{$inputs.contentTypeServicesFxp}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.acceptServicesFxp}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain providers", - "exec": [ - "expect(callback.body).to.have.property('providers')", - "expect(callback.body.providers.length).to.be.at.least(1)" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.FX_MSISDN_1}')" ] } ] @@ -212,25 +153,26 @@ "conversionRequestId": "{$function.generic.generateUUID}", "conversionTerms": { "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, - "expiration": "{$inputs.FXP_EXPIRATION}" + "expiration": "{$inputs.FX_EXPIRATION}" } }, "headers": { "Accept": "{$inputs.acceptFxQuotes}", "Content-Type": "{$inputs.contentTypeFxQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "disabled": false, @@ -273,10 +215,10 @@ }, { "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", + "description": "Callback sourceAmount (amount & currency) to match the request", "exec": [ "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + "request.body.conversionTerms.sourceAmount.amount && expect(callback.body.conversionTerms.sourceAmount.amount).to.equal('{$request.body.conversionTerms.sourceAmount.amount}')" ] }, { @@ -299,6 +241,14 @@ "exec": [ "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" ] + }, + { + "id": 18, + "description": "Callback transferAmount (amount & currency)to match the request Copy", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] } ] } @@ -325,18 +275,17 @@ "Accept": "{$inputs.acceptQuotes}", "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "transactionId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" + "fspId": "{$inputs.FX_PAYER_DFSP_ID}" }, "personalInfo": { "complexName": { @@ -355,8 +304,8 @@ }, "amountType": "SEND", "amount": { - "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -411,13 +360,6 @@ "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" ] }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, { "id": 9, "description": "Request transactionType scenario to be TRANSFER", @@ -456,10 +398,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.fromFspId}" + "name": "{$inputs.FX_PAYER_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -469,7 +411,7 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", "", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", @@ -497,10 +439,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + "name": "{$inputs.FX_PAYEE_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -513,7 +455,7 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", " }", @@ -539,10 +481,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -555,13 +497,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", @@ -575,7 +517,7 @@ } }, { - "id": 6, + "id": 9, "description": "POST /fxTransfers", "apiVersion": { "minorVersion": 0, @@ -596,21 +538,22 @@ "Accept": "{$inputs.acceptFxTransfers}", "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "body": { "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "determiningTransferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "amount": "{$prev.4.callback.body.conversionTerms.sourceAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.sourceAmount.currency}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.currency}" }, "condition": "{$prev.4.callback.body.condition}", "expiration": "{$requestVariables.expiration}" @@ -632,6 +575,13 @@ "exec": [ "expect(response.statusText).to.equal('Accepted')" ] + }, + { + "id": 3, + "description": "Callback length not zero", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] } ] }, @@ -644,7 +594,7 @@ } }, { - "id": 14, + "id": 10, "description": "Get Accounts for Payer AFTER fx transfer", "apiVersion": { "minorVersion": 0, @@ -657,43 +607,43 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.fromFspId}" + "name": "{$inputs.FX_PAYER_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer).to.not.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, "scripts": { "postRequest": { "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", " }", "})", "", - "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterFxTransfer}`);" ] } - }, - "tests" :{ - "assertions": [ - { - "id": 1, - "description": "Payer position should not be changed", - "exec": [ - "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" - ] - } - ] - } + } }, { - "id": 16, + "id": 11, "description": "Get Accounts for FXP AFTER fx transfer", "apiVersion": { "minorVersion": 0, @@ -706,10 +656,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -719,28 +669,21 @@ "id": 1, "description": "Payer position should be changed", "exec": [ - "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" - ] - }, - { - "id": 2, - "description": "Payee position should be changed", - "exec": [ - "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" + "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FX_SOURCE_AMOUNT)" ] }, { "id": 3, - "description": "FXP Source currency position should be changed", + "description": "FXP Source currency position should not be changed", "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" ] }, { "id": 4, - "description": "FXP Target currency position should be changed", + "description": "FXP Target currency position should not be changed", "exec": [ - "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" ] } ] @@ -751,13 +694,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", @@ -767,16 +710,97 @@ "", "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", "", - "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", - "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + "console.log(`Payer Position ${environment.FX_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FX_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FX_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FX_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" ] } } }, { - "id": 7, + "id": 15, + "description": "Get FxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.9.request.body.commitRequestId}", + "method": "get", + "params": { + "ID": "{$prev.9.request.body.commitRequestId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + } + ] + } + }, + { + "id": 12, "description": "POST /transfer", "apiVersion": { "minorVersion": 0, @@ -794,22 +818,23 @@ "method": "post", "url": "{$inputs.HOST_ML_API_ADAPTER}", "body": { - "transferId": "{$prev.6.request.body.determiningTransferId}", - "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "transferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.amount}" + "currency": "{$prev.5.callback.body.transferAmount.currency}", + "amount": "{$prev.5.callback.body.transferAmount.amount}" }, "ilpPacket": "{$prev.5.callback.body.ilpPacket}", "condition": "{$prev.5.callback.body.condition}", - "expiration": "{$requestVariables.expiration}" + "expiration": "{$prev.5.callback.body.expiration}" }, "headers": { "Accept": "{$inputs.acceptTransfers}", "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "disabled": false, "scriptingEngine": "javascript", @@ -850,13 +875,6 @@ "expect(callback.body.transferState).to.equal('COMMITTED')" ] }, - { - "id": 6, - "description": "Callback content-type to be transfers", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" - ] - }, { "id": 9, "description": "Request FSP source the same as quote callback FSP destination", @@ -875,7 +893,7 @@ } }, { - "id": 16, + "id": 13, "description": "Get Accounts for FXP AFTER transfer", "apiVersion": { "minorVersion": 0, @@ -888,41 +906,27 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", "tests": { "assertions": [ - { - "id": 1, - "description": "Payer position should be changed", - "exec": [ - "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_SOURCE_AMOUNT)" - ] - }, - { - "id": 2, - "description": "Payee position should be changed", - "exec": [ - "expect(environment.payeePositionBalanceAfterTransfer-environment.payeePositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_TARGET_AMOUNT)" - ] - }, { "id": 3, "description": "FXP Source currency position should be changed", "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FXP_SOURCE_AMOUNT)" + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.FX_SOURCE_AMOUNT)" ] }, { "id": 4, "description": "FXP Target currency position should be changed", "exec": [ - "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer-environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer).to.equal(+environment.FXP_TARGET_AMOUNT)" + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.not.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" ] } ] @@ -933,32 +937,25 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", - "", - "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", - "", - "console.log(`Payer Position ${environment.FXP_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", - "console.log(`Payee Position ${environment.FXP_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Source Currency ${environment.FXP_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", - "console.log(`FXP Target Currency ${environment.FXP_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + "" ] } } }, { - "id": 15, + "id": 14, "description": "Get Accounts for Payee AFTER transfer", "apiVersion": { "minorVersion": 0, @@ -971,20 +968,20 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + "name": "{$inputs.FX_PAYEE_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", - "tests" :{ + "tests": { "assertions": [ { "id": 1, - "description": "FXP position should not be changed", + "description": "Payee position should be changed", "exec": [ - "expect(environment.fxpPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + "expect(environment.payeePositionBalanceAfterTransfer).to.not.equal(environment.payeePositionBalanceBeforeFxTransfer)" ] } ] @@ -995,7 +992,7 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.payeePositionBalanceAfterTransfer= curAccount.value", " }", @@ -1007,8 +1004,89 @@ ] } } + }, + { + "id": 16, + "description": "Get FxTransfers after final transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.9.request.body.commitRequestId}", + "method": "get", + "params": { + "ID": "{$prev.9.request.body.commitRequestId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + } + ] + } } ] } ] -} +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/feature_tests/master.json b/collections/hub/golden_path/fx/feature_tests/master.json new file mode 100644 index 00000000..050a2969 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/master.json @@ -0,0 +1,20 @@ +{ + "order": [ + { + "name": "happy_path", + "type": "folder" + }, + { + "name": "duplicate_handling", + "type": "folder" + }, + { + "name": "negative_scenarios", + "type": "folder" + }, + { + "name": "settlement", + "type": "folder" + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json similarity index 62% rename from collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json rename to collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json index e86d88e2..e8df315c 100644 --- a/collections/hub/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json @@ -1,93 +1,22 @@ { "options": {}, - "name": "fxp_non_success_states", + "name": "hub_golden_path_fx_feature_tests_negative_scenarios_fxp_error", "test_cases": [ { "id": 1, - "name": "Check ABORTED state in PUT /fxTransfers/{ID}", + "name": "FX Quote - Error scenario", "fileInfo": { - "path": "collections/tests/fx/golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json", + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json", "labels": [ "fx" ] }, "meta": { - "info": "POST /fxTransfers returns PUT /fxTransfers/{ID} with ABORTED state" + "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" }, "requests": [ { - "id": 1, - "description": "Get party info Copy", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fspiop", - "asynchronous": true, - "additionalApi": true, - "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", - "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", - "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", - "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", - "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$inputs.toIdValue}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentType}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "Accept": "{$inputs.accept}" - }, - "disabled": false, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback body should contain party", - "exec": [ - "expect(callback.body).to.have.property('party')" - ] - }, - { - "id": 6, - "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 8, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')" - ] - } - ] - } - }, - { - "id": 2, + "id": 4, "description": "POST /fxQuotes", "apiVersion": { "minorVersion": 0, @@ -107,25 +36,26 @@ "conversionRequestId": "{$function.generic.generateUUID}", "conversionTerms": { "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT_ERROR_GENERIC}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, - "expiration": "{$inputs.FXP_EXPIRATION}" + "expiration": "{$inputs.FX_EXPIRATION}" } }, "headers": { "Accept": "{$inputs.acceptFxQuotes}", "Content-Type": "{$inputs.contentTypeFxQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "disabled": false, @@ -161,46 +91,83 @@ }, { "id": 5, - "description": "Callback body should contain conversionTerms", + "description": "Callback body should contain errorInformation code", "exec": [ - "expect(callback.body).to.have.property('conversionTerms')" + "expect(callback.body.errorInformation).to.have.property('errorCode')" ] }, { "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", - "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be fxQuotes", - "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" - ] - }, - { - "id": 16, - "description": "Callback body should contain condition", - "exec": [ - "expect(callback.body).to.have.property('condition')" - ] - }, - { - "id": 17, - "description": "Callback body should contain target amount", + "description": "Callback body should contain errorInformation description", "exec": [ - "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + "expect(callback.body.errorInformation).to.have.property('errorDescription')" ] } ] + }, + "params": { + "Type": "", + "ID": "" + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - Error Scenario", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID}/error" + }, + "requests": [ + { + "id": 1, + "description": "Get payer position before fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } } }, { - "id": 3, - "description": "POST /quotes", + "id": 2, + "description": "POST /fxTransfers", "apiVersion": { "minorVersion": 0, "majorVersion": 2, @@ -212,54 +179,34 @@ "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" }, - "operationPath": "/quotes", - "path": "/quotes", + "operationPath": "/fxTransfers", + "path": "/fxTransfers", "method": "post", - "url": "{$inputs.HOST_QUOTING_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.fromIdValue}", - "fspId": "{$inputs.fromFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$prev.1.callback.body.party.partyIdInfo.partyIdType}", - "partyIdentifier": "{$prev.1.callback.body.party.partyIdInfo.partyIdentifier}", - "fspId": "{$prev.1.callback.body.party.partyIdInfo.fspId}" - } - }, + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", - "amount": { - "amount": "{$inputs.FXP_SOURCE_AMOUNT}", - "currency": "{$inputs.FXP_SOURCE_CURRENCY}" + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT_ERROR_GENERIC}" }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" }, - "note": "{$inputs.note}" + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" }, + "scriptingEngine": "javascript", "disabled": false, "tests": { "assertions": [ @@ -293,52 +240,96 @@ }, { "id": 5, - "description": "Callback body should contain transferAmount", + "description": "Callback body should contain errorInformation code", "exec": [ - "expect(callback.body).to.have.property('transferAmount')" + "expect(callback.body.errorInformation).to.have.property('errorCode')" ] }, { "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", + "description": "Callback body should contain errorInformation description", "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + "expect(callback.body.errorInformation).to.have.property('errorDescription')" ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 3, + "description": "Get payer position after fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", + "id": 1, + "description": "Payer position should not be changed", "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + "expect(environment.payerPositionBalanceAfterFxTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" ] } ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterFxTransfer}`);" + ] + } } - }, + } + ] + }, + { + "id": 3, + "name": "Fx Transfer - success; Regular Transfer - error", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /transfers returns PUT /transfers/{ID}/error" + }, + "requests": [ { - "id": 4, + "id": 1, "description": "Get Accounts for Payer BEFORE fxTransfer", "apiVersion": { "minorVersion": 0, @@ -351,10 +342,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.fromFspId}" + "name": "{$inputs.FX_PAYER_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -364,7 +355,7 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", "", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", @@ -379,7 +370,7 @@ } }, { - "id": 5, + "id": 2, "description": "Get Accounts for Payee BEFORE fxTransfer", "apiVersion": { "minorVersion": 0, @@ -392,10 +383,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + "name": "{$inputs.FX_PAYEE_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -408,7 +399,7 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", " }", @@ -421,7 +412,7 @@ } }, { - "id": 8, + "id": 3, "description": "Get Accounts for FXP BEFORE fxTransfer", "apiVersion": { "minorVersion": 0, @@ -434,10 +425,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -450,13 +441,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", @@ -491,23 +482,23 @@ "Accept": "{$inputs.acceptFxTransfers}", "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$prev.2.request.body.conversionTerms.conversionId}", + "commitRequestId": "{$function.generic.generateUUID}", "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "1002" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" }, - "condition": "{$prev.3.callback.body.condition}", + "condition": "{$inputs.validCondition}", "expiration": "{$requestVariables.expiration}" }, "scriptingEngine": "javascript", @@ -541,33 +532,100 @@ "exec": [ "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" ] + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "POST /transfer that triggers an error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.9.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT_ERROR_GENERIC}" + }, + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] }, { - "id": 5, - "description": "Callback conversionState to be RESERVED", + "id": 2, + "description": "Response statusText be Accepted", "exec": [ - "expect(callback.body.conversionState).to.equal('RESERVED')" + "expect(response.statusText).to.equal('Accepted')" ] }, { - "id": 6, - "description": "Callback content-type to be fxTransfers", + "id": 3, + "description": "Callback Content Length not 0", "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + "expect(callback.headers['Content-Length']).to.not.equal('0')" ] }, { - "id": 8, - "description": "Callback body should contain fulfilment", + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", "exec": [ - "expect(callback.body).to.have.property('fulfilment')" + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" ] }, { - "id": 9, - "description": "Request FSP source the same as quote callback FSP destination", + "id": 5, + "description": "Callback should have error code", "exec": [ - "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + "expect(callback.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback should have error description", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" ] } ] @@ -581,8 +639,8 @@ } }, { - "id": 10, - "description": "Get Accounts for Payer AFTER fxTransfer", + "id": 11, + "description": "Get Accounts for Payer AFTER transfer", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -594,46 +652,44 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.fromFspId}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.fromFspId}" + "name": "{$inputs.FX_PAYER_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", + "disabled": false, "tests": { "assertions": [ { "id": 1, - "description": "Position should be changed", + "description": "Payer position should not be changed", "exec": [ - "expect(environment.payerPositionBalanceAfterFxTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" ] } ] }, - "disabled": false, "scripts": { "postRequest": { "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "Array.isArray(res) && res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "console.log(`Payer Position Balance after FxTransfer=${environment.payerPositionBalanceAfterFxTransfer}`);", - "", - "" + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" ] } } }, { - "id": 11, - "description": "Get Accounts for Payee AFTER fxTransfer", + "id": 12, + "description": "Get Accounts for Payee AFTER transfer", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -645,10 +701,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_PAYEE_DFSP_ID}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_PAYEE_DFSP_ID}" + "name": "{$inputs.FX_PAYEE_DFSP_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -656,9 +712,9 @@ "assertions": [ { "id": 1, - "description": "Position should not be changed", + "description": "FXP position should not be changed", "exec": [ - "expect(environment.payeePositionBalanceAfterFxTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" + "expect(environment.payeePositionBalanceAfterTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" ] } ] @@ -669,13 +725,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.payeePositionBalanceAfterFxTransfer= curAccount.value", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "console.log(`Payee Position Balance after FxTransfer=${environment.payeePositionBalanceAfterFxTransfer}`);", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", "", "" ] @@ -683,8 +739,8 @@ } }, { - "id": 12, - "description": "Get Accounts for FXP AFTER fxTransfer", + "id": 13, + "description": "Get Accounts for FXP AFTER transfer", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -696,10 +752,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -707,16 +763,16 @@ "assertions": [ { "id": 1, - "description": "Position of the source currency should not be changed", + "description": "FXP Source currency position should not be changed", "exec": [ - "expect(environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" ] }, { "id": 2, - "description": "Position of the target currency should not be changed", + "description": "FXP Target currency position should not be changed", "exec": [ - "expect(environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" ] } ] @@ -727,21 +783,21 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", - " environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer= curAccount.value", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "console.log(`FXP Source Currency Position Balance after FxTransfer=${environment.fxpSourceCurrencyPositionBalanceAfterFxTransfer}`);", + "console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", "", - "console.log(`FXP Target Currency Position Balance after FxTransfer=${environment.fxpTargetCurrencyPositionBalanceAfterFxTransfer}`);", + "console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", "", "" ] diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json new file mode 100644 index 00000000..074a5e93 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json @@ -0,0 +1,497 @@ +{ + "options": {}, + "name": "fxp_error", + "test_cases": [ + { + "id": 3, + "name": "Check that positions for FXP, Payer and Payee are not changed after FXTransfer fails with invalid fulfillment", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID} with invalid fulfillment" + }, + "requests": [ + { + "id": 1, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 3, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers that receives invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "15" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" + }, + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + }, + "params": { + "name": "" + } + }, + { + "id": 10, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.9.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" + }, + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback should have error code", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback should have error description", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for Payer AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "Array.isArray(res) && res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + } + }, + { + "id": 12, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP position should not be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 13, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP Source currency position should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + ] + }, + { + "id": 2, + "description": "FXP Target currency position should not be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/master.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/master.json new file mode 100644 index 00000000..09c8a4fe --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/master.json @@ -0,0 +1,20 @@ +{ + "order": [ + { + "name": "fxp_error.json", + "type": "file" + }, + { + "name": "fxp_invalid_fulfillment.json", + "type": "file" + }, + { + "name": "payee_invalid_fulfillment.json", + "type": "file" + }, + { + "name": "timeout_scenarios.json", + "type": "file" + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json new file mode 100644 index 00000000..c8a5f726 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json @@ -0,0 +1,497 @@ +{ + "options": {}, + "name": "fxp_error", + "test_cases": [ + { + "id": 3, + "name": "Check that positions for FXP, Payer and Payee are not changed after payee sends invalid fulfillment", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /transfers returns PUT /transfers/{ID} with invalid fulfillment" + }, + "requests": [ + { + "id": 1, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 3, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" + }, + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + }, + "params": { + "name": "" + } + }, + { + "id": 10, + "description": "POST /transfer that receives invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.9.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "15" + }, + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback should have error code", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorCode')" + ] + }, + { + "id": 6, + "description": "Callback should have error description", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for Payer AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "Array.isArray(res) && res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + } + }, + { + "id": 12, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP position should not be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 13, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP Source currency position should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + ] + }, + { + "id": 2, + "description": "FXP Target currency position should not be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json new file mode 100644 index 00000000..75e38190 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json @@ -0,0 +1,654 @@ +{ + "options": {}, + "name": "hub_golden_path_fx_feature_tests_negative_scenarios_timeout_scenarios", + "test_cases": [ + { + "id": 1, + "name": "Check that position for Payer is not changed after FXTransfer is expired", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "fxTransfer expired" + }, + "requests": [ + { + "id": 1, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers that expires", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "16" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" + }, + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "// Very short expiration", + "requestVariables.expiration =new Date(new Date().getTime() + 2 * 1000).toISOString()" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for Payer AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "Array.isArray(res) && res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + } + } + ] + }, + { + "id": 2, + "name": "Check that positions for FXP, Payer and Payee are not changed after transfer is expired", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "POST /fxTransfers returns PUT /fxTransfers/{ID} with invalid fulfillment" + }, + "requests": [ + { + "id": 1, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 3, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateUUID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "16" + }, + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "POST /transfer that expires", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.9.request.body.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "16" + }, + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.validCondition}", + "expiration": "{$requestVariables.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 2000).toISOString()" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for Payer AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should not be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterTransfer).to.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "Array.isArray(res) && res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterTransfer}`);" + ] + } + } + }, + { + "id": 12, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP position should not be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer).to.equal(environment.payeePositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 13, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "FXP Source currency position should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + ] + }, + { + "id": 2, + "description": "FXP Target currency position should not be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json b/collections/hub/golden_path/fx/feature_tests/settlement/settlement_tests.json similarity index 59% rename from collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json rename to collections/hub/golden_path/fx/feature_tests/settlement/settlement_tests.json index c67c165d..e0afbd71 100644 --- a/collections/hub/fx_golden_path/feature_tests/settlement/settlement_tests.json +++ b/collections/hub/golden_path/fx/feature_tests/settlement/settlement_tests.json @@ -4,9 +4,9 @@ "test_cases": [ { "id": 1, - "name": "FX Transfer", + "name": "Settlement FX Transfer tests", "fileInfo": { - "path": "collections/tests/fx/fx_tests.json", + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", "labels": [ "fx" ] @@ -85,7 +85,7 @@ "headers": { "Content-Type": "{$inputs.contentType}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", "Accept": "{$inputs.accept}" }, "disabled": false, @@ -154,7 +154,7 @@ "headers": { "Content-Type": "{$inputs.contentTypeServicesFxp}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", "Accept": "{$inputs.acceptServicesFxp}" }, "tests": { @@ -212,25 +212,25 @@ "conversionRequestId": "{$function.generic.generateUUID}", "conversionTerms": { "conversionId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, - "expiration": "{$inputs.FXP_EXPIRATION}" + "expiration": "{$inputs.FX_EXPIRATION}" } }, "headers": { "Accept": "{$inputs.acceptFxQuotes}", "Content-Type": "{$inputs.contentTypeFxQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", - "FSPIOP-Destination": "{$inputs.FXP_TESTFXP1_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "disabled": false, @@ -325,7 +325,7 @@ "Accept": "{$inputs.acceptQuotes}", "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" }, "body": { @@ -356,7 +356,7 @@ "amountType": "SEND", "amount": { "amount": "{$inputs.amount}", - "currency": "{$inputs.FXP_TARGET_CURRENCY}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, "transactionType": { "scenario": "TRANSFER", @@ -443,7 +443,7 @@ } }, { - "id": 8, + "id": 6, "description": "Get Accounts for FXP BEFORE fxTransfer", "apiVersion": { "minorVersion": 0, @@ -456,10 +456,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -472,13 +472,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", " }", @@ -513,21 +513,21 @@ "Accept": "{$inputs.acceptFxTransfers}", "Content-Type": "{$inputs.contentTypeFxTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", "determiningTransferId": "{$function.generic.generateUUID}", - "initiatingFsp": "{$inputs.FXP_PAYER_DFSP_ID}", - "counterPartyFsp": "{$inputs.FXP_TESTFXP1_ID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", "sourceAmount": { - "currency": "{$inputs.FXP_SOURCE_CURRENCY}", - "amount": "{$inputs.FXP_SOURCE_AMOUNT}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT}" }, "targetAmount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", - "amount": "{$inputs.FXP_TARGET_AMOUNT}" + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" }, "condition": "{$prev.4.callback.body.condition}", "expiration": "{$requestVariables.expiration}" @@ -623,9 +623,9 @@ "body": { "transferId": "{$prev.6.request.body.determiningTransferId}", "payeeFsp": "{$inputs.FXP_PAYEE_DFSP_ID}", - "payerFsp": "{$inputs.FXP_PAYER_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", "amount": { - "currency": "{$inputs.FXP_TARGET_CURRENCY}", + "currency": "{$inputs.FX_TARGET_CURRENCY}", "amount": "{$inputs.amount}" }, "ilpPacket": "{$prev.5.callback.body.ilpPacket}", @@ -636,7 +636,7 @@ "Accept": "{$inputs.acceptTransfers}", "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.FXP_PAYER_DFSP_ID}" + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "disabled": false, "scriptingEngine": "javascript", @@ -715,10 +715,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -731,13 +731,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", " }", @@ -749,601 +749,595 @@ ] } } - }, + } + ] + }, + { + "id": 2, + "name": "Create Settlement on the current open window", + "meta": { + "info": "Get current open window and close it" + }, + "requests": [ { - "id": 10, - "name": "Create Settlement on the current open window", + "id": 1, "meta": { - "info": "Get current open window and close it" + "info": "Get Existing Open Window" }, - "requests": [ - { - "id": 1, - "meta": { - "info": "Get Existing Open Window" - }, - "description": "Get Existing Open Window", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlementWindows", - "path": "/settlementWindows", - "method": "get", - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "queryParams": { - "state": "OPEN" - }, - "headers": { - "Content-Type": "application/json", - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "State should be OPEN", - "exec": [ - "expect(environment.openWindowstate).to.equal(\"OPEN\")" - ] - } + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" ] }, - "scriptingEngine": "javascript", - "scripts": { - "postRequest": { - "exec": [ - "var jsonData = response.body;", - "//console.log(jsonData.state);", - "", - "environment.openWindowID=jsonData[0].settlementWindowId;", - "environment.openWindowstate=jsonData[0].state;", - "", - "console.log(environment.openWindowID);" - ] - } - } - }, - { - "id": 2, - "meta": { - "info": "Close existent window" - }, - "description": "Close existent window", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlementWindows/{id}", - "path": "/settlementWindows/{$environment.openWindowID}", - "method": "post", - "params": { - "id": "{$environment.openWindowID}" - }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "body": { - "state": "CLOSED", - "reason": "string" - }, - "headers": { - "Content-Type": "application/json", - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Status code is 200 or 400", - "exec": [ - "if(response.status === 400){", - " expect(response.status).to.equal(400)", - "}", - "else{", - " expect(response.status).to.equal(200)", - "}", - "", - "" - ] - }, - { - "id": 2, - "description": "New window State should be OPEN", - "exec": [ - "", - " if (response.status === 400) {", - " ", - "expect(response.body.errorInformation.errorCode).to.eql('3100');", - "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", - "}else{", - " ", - " ", - " expect(environment.openWindowstate).to.equal(\"OPEN\");", - "}", - "", - "", - "" - ] - } + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" ] - }, - "scriptingEngine": "javascript", - "scripts": { - "postRequest": { - "exec": [ - "var jsonData = response.body;", - "var rcode = Number(response.status);", - "//console.log(rcode);", - "", - "//if (rcode == 200){", - "environment.closedWindowID= Number(environment.openWindowID);", - "environment.openWindowstate=jsonData.state;", - "", - "console.log(environment.openWindowstate);", - "console.log(environment.closedWindowID);", - "//}" - ] - } } - }, - { - "id": 3, - "meta": { - "info": "Create Settlement for Closed Window" - }, - "description": "Create Settlement for Closed Window", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlements", - "path": "/settlements", - "method": "post", - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "Content-Type": "application/json", - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Status code is 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Settlement State should be PENDING_SETTLEMENT", - "exec": [ - "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" - ] - }, - { - "id": 3, - "description": "Number of associated windows should be 1", - "exec": [ - "expect(response.body.settlementWindows.length).to.equal(1)" - ] - }, - { - "id": 4, - "description": "Associated Settlement Window ID is the correct one", - "exec": [ - "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" - ] - }, - { - "id": 5, - "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", - "exec": [ - "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" - ] - } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "Close existent window" + }, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" ] }, - "scriptingEngine": "javascript", - "body": { - "settlementModel": "DEFERREDNET{$inputs.currency}", - "reason": "TESTING", - "settlementWindows": [ - { - "id": "{$environment.closedWindowID}" - } + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" ] - }, - "delay": "3000", - "scripts": { - "postRequest": { - "exec": [ - "var jsonData = response.body;", - "environment.settlementId = jsonData.id;", - "environment.winstate = jsonData.state;", - "", - "" - ] - }, - "preRequest": { - "exec": [ - "//environment.closedWindowID = 6;", - "environment.closedWindowID = Number(environment.closedWindowID);", - "", - "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", - "*/" - ] - } } - } - ], - "fileInfo": { - "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", - "labels": [ - "settlements" ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } } }, { - "id": 10, - "name": "Prepare-settlement", + "id": 3, "meta": { - "info": "Prepare-settlement" + "info": "Create Settlement for Closed Window" }, - "requests": [ - { - "id": 4, - "meta": { - "info": "Prepare Settlement" - }, - "description": "Prepare Settlement", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" + "description": "Create Settlement for Closed Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] }, - "operationPath": "/settlements/{id}", - "path": "/settlements/{$environment.settlementId}", - "method": "get", - "params": { - "id": "{$environment.settlementId}" + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" + ] }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "expect(response.body.settlementWindows.length).to.equal(1)" + ] }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status is 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - } + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" ] }, - "scriptingEngine": "javascript", - "delay": "2500", - "scripts": { - "postRequest": { - "exec": [ - "" - ] - }, - "preRequest": { - "exec": [ - "" - ] - } + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "DEFERREDNET{$inputs.currency}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$environment.closedWindowID}" } - } - ], - "fileInfo": { - "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", - "labels": [ - "settlements" ] + }, + "delay": "3000", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "environment.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/" + ] + } } - }, + } + ], + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 11, + "name": "Prepare-settlement", + "meta": { + "info": "Prepare-settlement" + }, + "requests": [ { - "id": 11, - "name": "reserve-settlement", + "id": 4, "meta": { - "info": "reserve-settlement" + "info": "Prepare Settlement" }, - "requests": [ - { - "id": 4, - "meta": { - "info": "reserve Settlement" - }, - "description": "reserve Settlement", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlements/{id}", - "path": "/settlements/{$environment.settlementId}", - "method": "get", - "params": { - "id": "{$environment.settlementId}" - }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status is 200", - "exec": [ - "//if(environment.WINDOWISEMPTY === false){", - "expect(response.status).to.equal(200)", - "//}" - ] - } + "description": "Prepare Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" ] - }, - "scriptingEngine": "javascript", - "delay": "2500", - "scripts": { - "postRequest": { - "exec": [ - "" - ] - }, - "preRequest": { - "exec": [ - "" - ] - } } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] }, - { - "id": 5, - "meta": { - "info": "check state for participants after prepare" - }, - "description": "check state for participants after prepare", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlements/{id}", - "path": "/settlements/{$environment.settlementId}", - "method": "get", - "params": { - "id": "{$environment.settlementId}" - }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status is 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Check status PS_TRANSFERS_RESERVED", - "exec": [ - "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" - ] - }, - { - "id": 3, - "description": "Check status for window is PENDING SETTLEMENT", - "exec": [ - " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" - ] - }, - { - "id": 4, - "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", - "exec": [ - "expect(environment.controlvar).to.equal(true)" - ] - } + "preRequest": { + "exec": [ + "" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 12, + "name": "reserve-settlement", + "meta": { + "info": "reserve-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "reserve Settlement" + }, + "description": "reserve Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" ] - }, - "scripts": { - "postRequest": { - "exec": [ - "//Boolean isok = false;\r", - "var res = response.body;\r", - "var isok = true;\r", - "\r", - "try{\r", - "res.participants.map(function (participant) {\r", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", - " if(isok === true){ \r", - " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", - " isok= true;\r", - " \r", - " \r", - " \r", - " }else{\r", - " isok= false;\r", - " // console.log(isok);\r", - " \r", - " }\r", - " } \r", - " })\r", - "})\r", - "\r", - "}catch(exception){\r", - " console.log(exception);\r", - "}\r", - "\r", - "environment.controlvar = isok;" - ] - } } - } - ], - "fileInfo": { - "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", - "labels": [ - "settlements" ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } } }, { - "id": 12, - "name": "commit-settlement", + "id": 5, "meta": { - "info": "commit-settlement" + "info": "check state for participants after prepare" }, - "requests": [ - { - "id": 4, - "meta": { - "info": "commit Settlement" - }, - "description": "commit Settlement", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlements/{id}", - "path": "/settlements/{$environment.settlementId}", - "method": "get", - "params": { - "id": "{$environment.settlementId}" + "description": "check state for participants after prepare", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + { + "id": 2, + "description": "Check status PS_TRANSFERS_RESERVED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" + ] }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status is 200", - "exec": [ - "//if(environment.WINDOWISEMPTY === false){", - "expect(response.status).to.equal(200)", - "//}" - ] - } + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" ] }, - "scriptingEngine": "javascript", - "delay": "2500", - "scripts": { - "postRequest": { - "exec": [ - "" - ] - }, - "preRequest": { - "exec": [ - "" - ] - } + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] } - } - ], - "fileInfo": { - "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", - "labels": [ - "settlements" ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } } - }, + } + ], + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 13, + "name": "commit-settlement", + "meta": { + "info": "commit-settlement" + }, + "requests": [ { - "id": 13, - "name": "settle-settlement", + "id": 4, "meta": { - "info": "settle-settlement" + "info": "commit Settlement" }, - "requests": [ - { - "id": 4, - "meta": { - "info": "settle Settlement" - }, - "description": "settle Settlement", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "settlements" - }, - "operationPath": "/settlements/{id}", - "path": "/settlements/{$environment.settlementId}", - "method": "get", - "params": { - "id": "{$environment.settlementId}" - }, - "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", - "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status is 200", - "exec": [ - "//if(environment.WINDOWISEMPTY === false){", - "expect(response.status).to.equal(200)", - "//}" - ] - } + "description": "commit Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" ] - }, - "scriptingEngine": "javascript", - "delay": "2500", - "scripts": { - "postRequest": { - "exec": [ - "" - ] - }, - "preRequest": { - "exec": [ - "" - ] - } } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] } - ], - "fileInfo": { - "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", - "labels": [ - "settlements" + } + } + ], + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 14, + "name": "settle-settlement", + "meta": { + "info": "settle-settlement" + }, + "requests": [ + { + "id": 4, + "meta": { + "info": "settle Settlement" + }, + "description": "settle Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } } }, { - "id": 14, + "id": 15, "description": "Get Accounts for FXP AFTER Settlement", "apiVersion": { "minorVersion": 0, @@ -1356,10 +1350,10 @@ "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" }, "operationPath": "/participants/{name}/accounts", - "path": "/participants/{$inputs.FXP_TESTFXP1_ID}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", "method": "get", "params": { - "name": "{$inputs.FXP_TESTFXP1_ID}" + "name": "{$inputs.FX_TESTFXP1_ID}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "scriptingEngine": "javascript", @@ -1372,13 +1366,13 @@ "exec": [ "var res = response.body;", "", - "res.filter(account => account.currency === environment.FXP_SOURCE_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpSourceCurrencyPositionBalanceAfterSettlement= curAccount.value", " }", "})", "", - "res.filter(account => account.currency === environment.FXP_TARGET_CURRENCY).forEach(curAccount => {", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", " if(curAccount.ledgerAccountType === \"POSITION\") {", " environment.fxpTargetCurrencyPositionBalanceAfterSettlement= curAccount.value", " }", @@ -1391,7 +1385,13 @@ } } } - ] + ], + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } } ] -} +} \ No newline at end of file diff --git a/collections/hub/golden_path/fx/master.json b/collections/hub/golden_path/fx/master.json new file mode 100644 index 00000000..da223b77 --- /dev/null +++ b/collections/hub/golden_path/fx/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "feature_tests", + "type": "folder" + }, + { + "name": "api_schema_validation", + "type": "folder" + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/master.json b/collections/hub/golden_path/master.json index 08eee37d..014d3c04 100644 --- a/collections/hub/golden_path/master.json +++ b/collections/hub/golden_path/master.json @@ -1,45 +1,52 @@ { - "order": [ - { - "name": "feature_tests", - "type": "folder" - }, - { - "name": "bug fixes", - "type": "folder" - }, - { - "name": "p2p_on_us_transfers", - "type": "folder" - }, - { - "name": "quoting_service", - "type": "folder", - "labels": [ - "quotes" - ] - }, - { - "name": "transaction_request_service", - "type": "folder" - }, - { - "name": "settlement_management", - "type": "folder", - "labels": [ - "settlements" - ] - }, - { - "name": "api-tests", - "type": "folder" - }, - { - "name": "settlement_cgs", - "type": "folder", - "labels": [ - "settlements" - ] - } - ] -} \ No newline at end of file + "order": [ + { + "name": "feature_tests", + "type": "folder" + }, + { + "name": "bug fixes", + "type": "folder" + }, + { + "name": "p2p_on_us_transfers", + "type": "folder" + }, + { + "name": "quoting_service", + "type": "folder", + "labels": [ + "quotes" + ] + }, + { + "name": "transaction_request_service", + "type": "folder" + }, + { + "name": "settlement_management", + "type": "folder", + "labels": [ + "settlements" + ] + }, + { + "name": "api-tests", + "type": "folder" + }, + { + "name": "settlement_cgs", + "type": "folder", + "labels": [ + "settlements" + ] + }, + { + "name": "fx", + "type": "folder", + "labels": [ + "fx" + ] + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json new file mode 100644 index 00000000..ba1db8c0 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json @@ -0,0 +1,96 @@ +{ + "name": "Party Lookup Happy Path", + "test_cases": [ + { + "id": "1", + "name": "Party Lookup for ProxyAB if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "nonexistentpayerfsp", + "FSPIOP-Proxy": "testingtoolkitdfsp", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Source Header same as Payeefsp Id", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + }, + { + "id": 3, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version=1.0')" + ] + }, + { + "id": 5, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')" + ] + }, + { + "id": 6, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')" + ] + }, + { + "id": 7, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.personalInfo.complexName.firstName).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.personalInfo.complexName.lastName).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + } + ] + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json new file mode 100644 index 00000000..860eacce --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json @@ -0,0 +1,409 @@ +{ + "name": "Quotes Happy Path", + "test_cases": [ + { + "id": 1, + "name": "Proxy Quoting Service", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "nonexistentpayerfsp", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "nonexistentpayerfsp" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Source equal to request FSP Destination", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" + ] + }, + { + "id": 5, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount to match the request", + "exec": [ + "expect(callback.body.payeeReceiveAmount.amount).to.equal('{$request.body.amount.amount}')" + ] + }, + { + "id": 7, + "description": "Callback currency to match the request", + "exec": [ + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 8, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + ] + }, + { + "id": 9, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 10, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 12, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "path": "/quotes", + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + }, + { + "id": "2", + "name": "Party Lookup for other proxy in Scheme if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "an error callback is expected", + "exec": [ + "expect(callback.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_CODE}')", + "expect(callback.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "2", + "description": "Send Oracle lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + }, + "disabled": true + } + ] + }, + { + "id": "3", + "name": "Party Lookup for Proxy in Scheme if it is cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should not be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as TODO", + "exec": [ + "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "2", + "description": "Send Oracle lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.toIdValue}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "payerfsp", + "FSPIOP-Destination": "payeefsp" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have payeeDFSP set", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + }, + "disabled": true + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json new file mode 100644 index 00000000..25b7e631 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json @@ -0,0 +1,249 @@ +{ + "name": "Quotes Happy Path", + "test_cases": [ + { + "id": 1, + "name": "Proxy Transfers Service", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Source equal to request FSP Destination", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" + ] + }, + { + "id": 5, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "path": "/quotes", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "This request allows us to send a request for Transfer (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "transferId": "{$prev.1.request.body.transactionId}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$prev.1.callback.body.transferAmount.amount}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$prev.1.callback.body.expiration}", + "ilpPacket": "{$prev.1.callback.body.ilpPacket}", + "condition": "{$prev.1.callback.body.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/proxy/as_payee/happy_path", + "labels": [ + "transfers" + ] + } + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json new file mode 100644 index 00000000..9fc039af --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json @@ -0,0 +1,60 @@ +{ + "name": "Party Lookup Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json new file mode 100644 index 00000000..93ed47e5 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json @@ -0,0 +1,87 @@ +{ + "name": "Quotes Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", + "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" + } + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json new file mode 100644 index 00000000..cd4148d4 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json @@ -0,0 +1,78 @@ +{ + "name": "Transfers Negative Scenarios", + "test_cases": [ + { + "id": 1, + "name": "Proxy Transfers Service when there is an error in payee dfsp", + "requests": [ + { + "id": 1, + "meta": { + "info": "Test Case for scenario when there is an error in payee dfsp" + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "transferId": "{$function.generic.generateUUID}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$inputs.PAYEE_DFSP_ERROR_AMOUNT_5XXX}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$inputs.expiration}", + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "path": "/quotes", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ] + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json new file mode 100644 index 00000000..20d71d48 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -0,0 +1,142 @@ +{ + "name": "Party Lookup Happy Path", + "test_cases": [ + { + "id": "1", + "name": "Party Lookup for ProxyAB if not cached", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Proxy Header should be set", + "exec": [ + "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Source Header same as Payeefsp Id", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 5, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version=1.0')" + ] + }, + { + "id": 6, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')" + ] + }, + { + "id": 7, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.personalInfo.complexName.firstName).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')" + ] + }, + { + "id": 9, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.personalInfo.complexName.lastName).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" + ] + } + ] + } + }, + { + "id": "2", + "description": "Send Oracle lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ORACLE}", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle has Proxy Payee DFSP set", + "exec": [ + "expect(response.body.partyList[0].fspId).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json new file mode 100644 index 00000000..9c41f908 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json @@ -0,0 +1,177 @@ +{ + "name": "Quotes Happy Path", + "test_cases": [ + { + "id": 1, + "name": "Proxy Quoting Service", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Source equal to request FSP Destination", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" + ] + }, + { + "id": 5, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "path": "/quotes", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + } + ] + } \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json new file mode 100644 index 00000000..b739243e --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json @@ -0,0 +1,247 @@ +{ + "name": "Transfers Happy Path", + "test_cases": [ + { + "id": 1, + "name": "Proxy Transfers Service", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.PROXY_AMOUNT}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + } + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Source equal to request FSP Destination", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" + ] + }, + { + "id": 5, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "path": "/quotes", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "This request allows us to send a request for Transfer (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$prev.1.request.body.transactionId}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$prev.1.callback.body.transferAmount.amount}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$prev.1.callback.body.expiration}", + "ilpPacket": "{$prev.1.callback.body.ilpPacket}", + "condition": "{$prev.1.callback.body.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + } + ] + }, + "path": "/transfers", + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json new file mode 100644 index 00000000..da99890c --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json @@ -0,0 +1,764 @@ +{ + "name": "Party Lookup Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for Bad Request - 400", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 400", + "exec": [ + "expect(response.status).to.equal(400)" + ] + }, + { + "id": 2, + "description": "Response error code to be 3102", + "exec": [ + "expect(response.body.errorInformation.errorCode).to.equal('3102')" + ] + } + ] + } + } + ] + }, + { + "id": "2", + "name": "Test Case for error in Payer Scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + }, + "disabled": true + } + ] + }, + { + "id": "3", + "name": "Test Case for scenario where the receiving dfsp is not in payer proxy cache", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION}')" + ] + } + ] + }, + "disabled": true + } + ] + }, + { + "id": "4", + "name": "Test Case for scenario when there is an error in proxy", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response Source Header should be proxy", + "exec": [ + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Callback response has errorCode", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')" + ] + }, + { + "id": 5, + "description": "Callback response has errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" + ] + } + ] + } + } + ] + }, + { + "id": "5", + "name": "Test Case for scenario when there is an error in payee scheme", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 2xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "await custom.sleep(maxRetryWait)" + ] + } + } + }, + { + "id": "2", + "description": "Negative test case for error code 3xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "await custom.sleep(maxRetryWait)" + ] + } + } + }, + { + "id": "3", + "description": "Negative test case for error code 4xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "await custom.sleep(maxRetryWait)" + ] + } + } + }, + { + "id": "4", + "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "await custom.sleep(maxRetryWait)" + ] + } + } + } + ] + }, + { + "id": "6", + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": "1", + "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + ] + } + ] + } + } + ] + }, + { + "id": "7", + "name": "Party Lookup for scenario when there is an eror in Oracle", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION}')" + ] + } + ] + }, + "disabled": true + } + ] + }, + { + "id": "8", + "name": "Party Lookup for Payer Cache no longer valid", + "requests": [ + { + "id": "1", + "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION}')" + ] + } + ] + }, + "disabled": true + }, + { + "id": "2", + "description": "Send Oracle lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" + }, + "headers": { + "Accept": "application/vnd.interoperability.participants+json;version=1.0", + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Oracle should not have mapping for the party ID", + "exec": [ + "expect(response.fspId).to.equal('')" + ] + } + ] + }, + "disabled": true + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json similarity index 64% rename from collections/proxy/proxy_golden_path/negative_scenarios/quotes.json rename to collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json index 6a2074c8..4cddea40 100644 --- a/collections/proxy/proxy_golden_path/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json @@ -8,6 +8,13 @@ { "id": "1", "description": "Quote request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -69,293 +76,17 @@ }, { "id": "2", - "name": "Test Case for error in Payer Scheme", - "requests": [ - { - "id": "1", - "description": "Negative test case for error code 2xxx", - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" - } - }, - "amountType": "RECEIVE", - "amount": { - "amount": "{$inputs.PROXY_AMOUNT}", - "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - } - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" - ] - } - ] - } - }, - { - "id": "2", - "description": "Negative test case for error code 3xxx", - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" - } - }, - "amountType": "RECEIVE", - "amount": { - "amount": "{$inputs.PROXY_AMOUNT}", - "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - } - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" - ] - } - ] - } - }, - { - "id": "3", - "description": "Negative test case for error code 4xxx", - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" - } - }, - "amountType": "RECEIVE", - "amount": { - "amount": "{$inputs.PROXY_AMOUNT}", - "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - } - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" - ] - } - ] - } - }, - { - "id": "4", - "description": "Negative test case for error code 5xxx", - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" - } - }, - "amountType": "RECEIVE", - "amount": { - "amount": "{$inputs.PROXY_AMOUNT}", - "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - } - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" - ] - } - ] - } - } - ] - }, - { - "id": "3", "name": "Test Case for scenario where the receiving dfsp is not in payer proxy cache", "requests": [ { "id": "1", "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, "operationPath": "/quotes", "method": "post", "headers": { @@ -420,17 +151,25 @@ ] } ] - } + }, + "disabled": true } ] }, { - "id": "4", + "id": "3", "name": "Test Case for scenario when there is an error in proxy", "requests": [ { "id": "1", "description": "Send party lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -450,13 +189,6 @@ "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" } }, "payee": { @@ -490,22 +222,28 @@ "id": 2, "description": "Response Source Header should be proxy", "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('${inputs.FSPIOP_PROXY_HEADER}')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_HEADER}')" ] }, { "id": 3, - "description": "Response Destination Header same as Payerfsp Id", + "description": "Callback FSP Destination equal to request FSP Source", "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" ] }, { "id": 4, - "description": "Callback response has errorCode and errorDescription", + "description": "Callback response has errorCode", + "exec": [ + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')" + ] + }, + { + "id": 5, + "description": "Callback response has errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" ] } ] @@ -514,12 +252,19 @@ ] }, { - "id": "5", + "id": "4", "name": "Test Case for scenario when there is an error in payee scheme", "requests": [ { "id": "1", "description": "Negative test case for error code 2xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -544,8 +289,7 @@ "complexName": { "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } } }, "payee": { @@ -589,6 +333,13 @@ { "id": "2", "description": "Negative test case for error code 3xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -613,8 +364,7 @@ "complexName": { "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } } }, "payee": { @@ -653,11 +403,18 @@ ] } ] - } + } }, { "id": "3", "description": "Negative test case for error code 4xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -682,8 +439,7 @@ "complexName": { "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } } }, "payee": { @@ -722,11 +478,18 @@ ] } ] - } + } }, { "id": "4", "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -751,8 +514,7 @@ "complexName": { "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } } }, "payee": { @@ -791,17 +553,24 @@ ] } ] - } + } } ] }, { - "id": "6", + "id": "5", "name": "Test Case for scenario when there is an error in payee dfsp", "requests": [ { "id": "1", "description": "Negative test case for error code 5xxx", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", "operationPath": "/quotes", "method": "post", "headers": { @@ -826,8 +595,7 @@ "complexName": { "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" + } } }, "payee": { diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json new file mode 100644 index 00000000..fc2e6281 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json @@ -0,0 +1,239 @@ +{ + "name": "Transfers Negative Scenarios", + "test_cases": [ + { + "id": 1, + "name": "Test Case for scenario when there is an error in proxy", + "requests": [ + { + "id": 1, + "meta": { + "info": "Test Case for scenario when there is an error in proxy" + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateUUID}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$inputs.expiration}", + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "path": "/transfers", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + }, + { + "id": 2, + "name": "Test Case for scenario when there is an error in payee scheme", + "requests": [ + { + "id": 1, + "meta": { + "info": "Test Case for scenario when there is an error in proxy" + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateUUID}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$inputs.expiration}", + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "path": "/transfers", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + }, + { + "id": 3, + "name": "Test Case for scenario when there is an error in payee dfsp", + "requests": [ + { + "id": 1, + "meta": { + "info": "Test Case for scenario when there is an error in proxy" + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateUUID}", + "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "amount": { + "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "expiration": "{$inputs.expiration}", + "ilpPacket": "{$inputs.ilpPacket}", + "condition": "{$inputs.condition}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "path": "/transfers", + + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/golden_path/quoting_service/quoting_service.json", + "labels": [ + "quotes" + ] + } + } + ] + } \ No newline at end of file diff --git a/collections/hub/master.json b/collections/hub/master.json index 2c806858..124f59cc 100644 --- a/collections/hub/master.json +++ b/collections/hub/master.json @@ -5,23 +5,19 @@ "type": "folder" }, { - "name": "golden_path", - "type": "folder" - }, - { - "name": "other_tests", + "name": "provisioning", "type": "folder" }, { - "name": "provisioning_sdkbulk", + "name": "golden_path", "type": "folder" }, { - "name": "provisioning_thirdparty", + "name": "thirdparty", "type": "folder" }, { - "name": "provisioning", + "name": "inter_scheme", "type": "folder" }, { @@ -33,11 +29,7 @@ "type": "folder" }, { - "name": "thirdparty", - "type": "folder" - }, - { - "name": "provisioning_dfsp", + "name": "other_tests", "type": "folder" } ] diff --git a/collections/hub/provisioning/CGS_Specific/add-users-to-new-sims-and-als-registration.json b/collections/hub/provisioning/for_golden_path/CGS_Specific/add-users-to-new-sims-and-als-registration.json similarity index 100% rename from collections/hub/provisioning/CGS_Specific/add-users-to-new-sims-and-als-registration.json rename to collections/hub/provisioning/for_golden_path/CGS_Specific/add-users-to-new-sims-and-als-registration.json diff --git a/collections/hub/provisioning/CGS_Specific/adjust-participants-limits.json b/collections/hub/provisioning/for_golden_path/CGS_Specific/adjust-participants-limits.json similarity index 100% rename from collections/hub/provisioning/CGS_Specific/adjust-participants-limits.json rename to collections/hub/provisioning/for_golden_path/CGS_Specific/adjust-participants-limits.json diff --git a/collections/hub/provisioning/CGS_Specific/master.json b/collections/hub/provisioning/for_golden_path/CGS_Specific/master.json similarity index 100% rename from collections/hub/provisioning/CGS_Specific/master.json rename to collections/hub/provisioning/for_golden_path/CGS_Specific/master.json diff --git a/collections/hub/provisioning/CGS_Specific/oracle-onboarding.json b/collections/hub/provisioning/for_golden_path/CGS_Specific/oracle-onboarding.json similarity index 100% rename from collections/hub/provisioning/CGS_Specific/oracle-onboarding.json rename to collections/hub/provisioning/for_golden_path/CGS_Specific/oracle-onboarding.json diff --git a/collections/hub/provisioning/MojaloopHub_Setup/hub.json b/collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json similarity index 100% rename from collections/hub/provisioning/MojaloopHub_Setup/hub.json rename to collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/master.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/master.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/master.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/master.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp3.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp3.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp4.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json similarity index 100% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp4.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json similarity index 91% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json index a4838422..458313ad 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json @@ -3,9 +3,9 @@ "test_cases": [ { "id": 1, - "name": "testingtoolkitdfsp provisioning", + "name": "Primary Account", "meta": { - "info": "testingtoolkitdfsp provisioning" + "info": "Primary Account" }, "requests": [ { @@ -90,7 +90,194 @@ } ] } + } + ] + }, + { + "id": 2, + "name": "Additional Currencies", + "meta": { + "info": "Additional Currencies" + }, + "requests": [ + { + "id": 27, + "meta": { + "info": "Add participant with second currency" + }, + "description": "Add participant with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "testingtoolkitdfsp", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } }, + { + "id": 28, + "meta": { + "info": "Add initial position and limits with second currency" + }, + "description": "Add initial position and limits with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/testingtoolkitdfsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "testingtoolkitdfsp" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 29, + "description": "Add participant with second currency CGS", + "meta": { + "info": "Add participant with second currency" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "testingtoolkitdfsp", + "currency": "{$inputs.cgscurrency}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 30, + "description": "Add initial position and limits with second currency CGS", + "meta": { + "info": "Add initial position and limits with second currency" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/testingtoolkitdfsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "testingtoolkitdfsp" + }, + "body": { + "currency": "{$inputs.cgscurrency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json" + } + }, + { + "id": 3, + "name": "Endpoints", + "meta": { + "info": "Endpoints" + }, + "requests": [ { "id": 3, "meta": { @@ -981,37 +1168,36 @@ }, { "id": 27, + "description": "Add callback - FX TRANSFERS POST", "meta": { - "info": "Add participant with second currency" + "info": "Add callback - FX TRANSFERS POST" }, - "description": "Add participant with second currency", "apiVersion": { "minorVersion": 0, "majorVersion": 1, "type": "central_admin" }, - "operationPath": "/participants", - "path": "/participants", + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/testingtoolkitdfsp/endpoints", "method": "post", - "body": { - "name": "testingtoolkitdfsp", - "currency": "{$inputs.currency2}" + "params": { + "name": "testingtoolkitdfsp" }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "Content-Type": "application/json" }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, "tests": { "assertions": [ { "id": 1, - "description": "status to be 201 if not exists or 400 if exists", + "description": "Status code is 201", "exec": [ - "if (response.body.errorInformation) {", - " expect(response.status).to.equal(400)", - "} else {", - " expect(response.status).to.equal(201)", - "}" + "expect(response.status).to.equal(201)" ] } ] @@ -1019,44 +1205,36 @@ }, { "id": 28, + "description": "Add callback - FX TRANSFERS PUT", "meta": { - "info": "Add initial position and limits with second currency" + "info": "Add callback - FX TRANSFERS PUT" }, - "description": "Add initial position and limits with second currency", "apiVersion": { "minorVersion": 0, "majorVersion": 1, "type": "central_admin" }, - "operationPath": "/participants/{name}/initialPositionAndLimits", - "path": "/participants/testingtoolkitdfsp/initialPositionAndLimits", + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/testingtoolkitdfsp/endpoints", "method": "post", "params": { "name": "testingtoolkitdfsp" }, - "body": { - "currency": "{$inputs.currency2}", - "limit": { - "type": "NET_DEBIT_CAP", - "value": 1000000 - }, - "initialPosition": 0 - }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "Content-Type": "application/json" }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, "tests": { "assertions": [ { "id": 1, - "description": "status to be 201 if not exists or 500 if exists", + "description": "Status code is 201", "exec": [ - "if (response.body.errorInformation) {", - " expect(response.status).to.equal(500)", - "} else {", - " expect(response.status).to.equal(201)", - "}" + "expect(response.status).to.equal(201)" ] } ] @@ -1064,37 +1242,36 @@ }, { "id": 29, - "description": "Add participant with second currency CGS", + "description": "Add callback - FX TRANSFERS ERROR", "meta": { - "info": "Add participant with second currency" + "info": "Add callback - FX TRANSFERS ERROR" }, "apiVersion": { "minorVersion": 0, "majorVersion": 1, "type": "central_admin" }, - "operationPath": "/participants", - "path": "/participants", + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/testingtoolkitdfsp/endpoints", "method": "post", - "body": { - "name": "testingtoolkitdfsp", - "currency": "{$inputs.cgscurrency}" + "params": { + "name": "testingtoolkitdfsp" }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "Content-Type": "application/json" }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, "tests": { "assertions": [ { "id": 1, - "description": "status to be 201 if not exists or 400 if exists", + "description": "Status code is 201", "exec": [ - "if (response.body.errorInformation) {", - " expect(response.status).to.equal(400)", - "} else {", - " expect(response.status).to.equal(201)", - "}" + "expect(response.status).to.equal(201)" ] } ] @@ -1102,56 +1279,45 @@ }, { "id": 30, - "description": "Add initial position and limits with second currency CGS", + "description": "Add callback - FXQUOTES PUT", "meta": { - "info": "Add initial position and limits with second currency" + "info": "Add callback - FXQUOTES PUT" }, "apiVersion": { "minorVersion": 0, "majorVersion": 1, "type": "central_admin" }, - "operationPath": "/participants/{name}/initialPositionAndLimits", - "path": "/participants/testingtoolkitdfsp/initialPositionAndLimits", + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/testingtoolkitdfsp/endpoints", "method": "post", "params": { "name": "testingtoolkitdfsp" }, - "body": { - "currency": "{$inputs.cgscurrency}", - "limit": { - "type": "NET_DEBIT_CAP", - "value": 1000000 - }, - "initialPosition": 0 - }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "Content-Type": "application/json" }, - "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, "tests": { "assertions": [ { "id": 1, - "description": "status to be 201 if not exists or 500 if exists", + "description": "Status code is 201", "exec": [ - "if (response.body.errorInformation) {", - " expect(response.status).to.equal(500)", - "} else {", - " expect(response.status).to.equal(201)", - "}" + "expect(response.status).to.equal(201)" ] } ] } } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json" - } + ] }, { - "id": 2, + "id": 4, "name": "testingtoolkitdfsp fundsin", "meta": { "info": "testingtoolkitdfsp fundsin" diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json new file mode 100644 index 00000000..19788650 --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json @@ -0,0 +1,1460 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Primary Account", + "meta": { + "info": "Primary Account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add participant" + }, + "description": "Add participant", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "ttkfxp1", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits" + }, + "description": "Add initial position and limits", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/ttkfxp1/initialPositionAndLimits", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Additional Currencies", + "meta": { + "info": "Additional Currencies" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add participant with second currency" + }, + "description": "Add participant with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "ttkfxp1", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits with second currency" + }, + "description": "Add initial position and limits with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/ttkfxp1/initialPositionAndLimits", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "Endpoints", + "meta": { + "info": "Endpoints" + }, + "requests": [ + { + "id": 3, + "meta": { + "info": "Add callback - PARTICIPANT PUT" + }, + "description": "Add callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add callback - PARTICIPANT PUT Error" + }, + "description": "Add callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add callback - PARTIES GET" + }, + "description": "Add callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add callback - PARTIES PUT" + }, + "description": "Add callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add callback - QUOTES PUT" + }, + "description": "Add callback - QUOTES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add callback - TRANSFERS POST" + }, + "description": "Add callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add callback - TRANSFERS PUT" + }, + "description": "Add callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add callback - TRANSFERS ERROR" + }, + "description": "Add callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add callback - PARTIES SUB-ID GET" + }, + "description": "Add callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add callback - PARTIES SUB-ID PUT" + }, + "description": "Add callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE" + }, + "description": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Setup Bulk POST endpoint" + }, + "description": "Setup Bulk POST endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Setup Bulk PUT endpoint" + }, + "description": "Setup Bulk PUT endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Setup Bulk PUT /error endpoint" + }, + "description": "Setup Bulk PUT /error endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add ttkfxp1 callback - PARTICIPANT PUT Batch" + }, + "description": "Add ttkfxp1 callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add ttkfxp1 callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add ttkfxp1 callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add callback - PARTIES PUT ERROR" + }, + "description": "Add callback - PARTIES PUT ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 27, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 28, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 29, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 30, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxp1/endpoints", + "method": "post", + "params": { + "name": "ttkfxp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + }, + { + "id": 4, + "name": "Fundsin", + "meta": { + "info": "Fundsin" + }, + "requests": [ + { + "id": 4, + "description": "Get Status Request before deposit for currency2", + "meta": { + "info": "Get Status Request before deposit" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/ttkfxp1/accounts", + "method": "get", + "params": { + "name": "ttkfxp1" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency2')) {", + " pm.environment.set(\"ttkfxp1Currency2SettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"ttkfxp1Currency2SettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 5, + "description": "Deposit Funds in Settlement Account currency2", + "meta": { + "info": "Deposit Funds in Settlement Account" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/ttkfxp1/accounts/{$environment.ttkfxp1Currency2SettlementAccountId}", + "method": "post", + "params": { + "name": "ttkfxp1", + "id": "{$environment.ttkfxp1Currency2SettlementAccountId}" + }, + "body": { + "transferId": "{$environment.ttkfxp1fundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.ttkfxp1fundsInPrepareAmountCurrency2}", + "currency": "{$inputs.currency2}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('ttkfxp1fundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('ttkfxp1fundsInPrepareAmountCurrency2', 5000);" + ] + } + } + }, + { + "id": 6, + "description": "Get Status Request after deposit for currency2", + "meta": { + "info": "Get Status Request after deposit" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/ttkfxp1/accounts", + "method": "get", + "params": { + "name": "ttkfxp1" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.ttkfxp1Currency2SettlementAccountBalanceAfterFundsIn).to.equal(+environment.ttkfxp1Currency2SettlementAccountBalanceBeforeFundsIn - +environment.ttkfxp1fundsInPrepareAmountCurrency2)" + ] + } + ] + }, + "delay": "{$inputs.DELAY_FUNDS_IN}", + "scripts": { + "postRequest": { + "exec": [ + "const expectedBalance = Number.parseFloat(pm.environment.get(\"ttkfxp1Currency2SettlementAccountBalanceBeforeFundsIn\")) - Number.parseFloat(pm.environment.get(\"ttkfxp1fundsInPrepareAmountCurrency2\"))", + "console.log(`balanceBeforeFundsIn: `, Number.parseFloat(pm.environment.get(\"ttkfxp1Currency2SettlementAccountBalanceBeforeFundsIn\")))", + "console.log(`fundsInPrepareAmount: `, Number.parseFloat(pm.environment.get(\"ttkfxp1fundsInPrepareAmountCurrency2\")))", + "console.log(`expectedBalance: `, expectedBalance)", + "// lets get retry config", + "const maxRetryCount = Number.parseFloat(environment.RETRY_MAX_ATTEMPTS) || 20", + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "", + "async function main() {", + " let res = pm.response", + " let jsonData = res.body", + "", + " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", + " ", + " let isOk = false;", + " ", + " for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency2') && Number.parseFloat(jsonData[i].value) == expectedBalance) {", + " pm.environment.set(\"ttkfxp1Currency2SettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " isOk = true", + " }", + " }", + " if (isOk) {", + " console.log(`Everything is OK, let's continue`)", + " break; // lets break out of retry loop loop", + " } else {", + " console.log(`Everything is NOT OK, let's wait for ${maxRetryWait}ms, and try again...`)", + " await wait(maxRetryWait)", + " const pmResponse = await makeRequest()", + " jsonData = JSON.parse(pmResponse.body)", + " }", + " }", + "}", + "", + "async function makeRequest() {", + " const requestParams = {", + " method: 'GET', ", + " url: `${environment.HOST_CENTRAL_LEDGER}/participants/ttkfxp1/accounts`,", + " header: {", + " 'Content-Type': 'application/json',", + " },", + " };", + " ", + " return new Promise((resolve, reject) => {", + " pm.sendRequest(requestParams, (error, response) => {", + " if (error) reject(error)", + " resolve(response)", + " })", + " })", + "}", + "", + "function wait(ms) {", + " return new Promise((resolve) => {", + " setTimeout(resolve, ms)", + " });", + "}", + "", + "main()" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json new file mode 100644 index 00000000..fb724616 --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json @@ -0,0 +1,1142 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Primary Account", + "meta": { + "info": "Primary Account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add participant with second currency" + }, + "description": "Add participant with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "ttkfxpayee", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits with second currency" + }, + "description": "Add initial position and limits with second currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/ttkfxpayee/initialPositionAndLimits", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "Endpoints", + "meta": { + "info": "Endpoints" + }, + "requests": [ + { + "id": 3, + "meta": { + "info": "Add callback - PARTICIPANT PUT" + }, + "description": "Add callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add callback - PARTICIPANT PUT Error" + }, + "description": "Add callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add callback - PARTIES GET" + }, + "description": "Add callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add callback - PARTIES PUT" + }, + "description": "Add callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add callback - QUOTES PUT" + }, + "description": "Add callback - QUOTES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add callback - TRANSFERS POST" + }, + "description": "Add callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add callback - TRANSFERS PUT" + }, + "description": "Add callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add callback - TRANSFERS ERROR" + }, + "description": "Add callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add callback - PARTIES SUB-ID GET" + }, + "description": "Add callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add callback - PARTIES SUB-ID PUT" + }, + "description": "Add callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE" + }, + "description": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Setup Bulk POST endpoint" + }, + "description": "Setup Bulk POST endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Setup Bulk PUT endpoint" + }, + "description": "Setup Bulk PUT endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Setup Bulk PUT /error endpoint" + }, + "description": "Setup Bulk PUT /error endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add ttkfxpayee callback - PARTICIPANT PUT Batch" + }, + "description": "Add ttkfxpayee callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add ttkfxpayee callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add ttkfxpayee callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add callback - PARTIES PUT ERROR" + }, + "description": "Add callback - PARTIES PUT ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 27, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 28, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 29, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 30, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayee/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayee" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json new file mode 100644 index 00000000..5fcdeeec --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json @@ -0,0 +1,1368 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Primary Account", + "meta": { + "info": "Primary Account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add participant" + }, + "description": "Add participant", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "ttkfxpayer", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits" + }, + "description": "Add initial position and limits", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/ttkfxpayer/initialPositionAndLimits", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "Endpoints", + "meta": { + "info": "Endpoints" + }, + "requests": [ + { + "id": 3, + "meta": { + "info": "Add callback - PARTICIPANT PUT" + }, + "description": "Add callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add callback - PARTICIPANT PUT Error" + }, + "description": "Add callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add callback - PARTIES GET" + }, + "description": "Add callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add callback - PARTIES PUT" + }, + "description": "Add callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add callback - QUOTES PUT" + }, + "description": "Add callback - QUOTES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add callback - TRANSFERS POST" + }, + "description": "Add callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add callback - TRANSFERS PUT" + }, + "description": "Add callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add callback - TRANSFERS ERROR" + }, + "description": "Add callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add callback - PARTIES SUB-ID GET" + }, + "description": "Add callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add callback - PARTIES SUB-ID PUT" + }, + "description": "Add callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE" + }, + "description": "Add callback - FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Endpoint-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Endpoint-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "DFSP Endpoint-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.email}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Setup Bulk POST endpoint" + }, + "description": "Setup Bulk POST endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Setup Bulk PUT endpoint" + }, + "description": "Setup Bulk PUT endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Setup Bulk PUT /error endpoint" + }, + "description": "Setup Bulk PUT /error endpoint", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add ttkfxpayer callback - PARTICIPANT PUT Batch" + }, + "description": "Add ttkfxpayer callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add ttkfxpayer callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add ttkfxpayer callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add callback - PARTIES PUT ERROR" + }, + "description": "Add callback - PARTIES PUT ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 27, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 28, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 29, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 30, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/ttkfxpayer/endpoints", + "method": "post", + "params": { + "name": "ttkfxpayer" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + }, + { + "id": 4, + "name": "Fundsin", + "meta": { + "info": "Fundsin" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Get Status Request before deposit" + }, + "description": "Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/ttkfxpayer/accounts", + "method": "get", + "params": { + "name": "ttkfxpayer" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"ttkfxpayerSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"ttkfxpayerSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 2, + "meta": { + "info": "Deposit Funds in Settlement Account" + }, + "description": "Deposit Funds in Settlement Account", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/ttkfxpayer/accounts/{$environment.ttkfxpayerSettlementAccountId}", + "method": "post", + "params": { + "name": "ttkfxpayer", + "id": "{$environment.ttkfxpayerSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.ttkfxpayerfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.ttkfxpayerfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('ttkfxpayerfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('ttkfxpayerfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 3, + "meta": { + "info": "Get Status Request after deposit" + }, + "description": "Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/ttkfxpayer/accounts", + "method": "get", + "params": { + "name": "ttkfxpayer" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.ttkfxpayerSettlementAccountBalanceAfterFundsIn).to.equal(+environment.ttkfxpayerSettlementAccountBalanceBeforeFundsIn - +environment.ttkfxpayerfundsInPrepareAmount)" + ] + } + ] + }, + "delay": "{$inputs.DELAY_FUNDS_IN}", + "scripts": { + "postRequest": { + "exec": [ + "const expectedBalance = Number.parseFloat(pm.environment.get(\"ttkfxpayerSettlementAccountBalanceBeforeFundsIn\")) - Number.parseFloat(pm.environment.get(\"ttkfxpayerfundsInPrepareAmount\"))", + "console.log(`balanceBeforeFundsIn: `, Number.parseFloat(pm.environment.get(\"ttkfxpayerSettlementAccountBalanceBeforeFundsIn\")))", + "console.log(`fundsInPrepareAmount: `, Number.parseFloat(pm.environment.get(\"ttkfxpayerfundsInPrepareAmount\")))", + "console.log(`expectedBalance: `, expectedBalance)", + "// lets get retry config", + "const maxRetryCount = Number.parseFloat(environment.RETRY_MAX_ATTEMPTS) || 20", + "const maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250", + "", + "async function main() {", + " let res = pm.response", + " let jsonData = res.body", + "", + " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", + " ", + " let isOk = false;", + " ", + " for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency') && jsonData[i].value == expectedBalance) {", + " pm.environment.set(\"ttkfxpayerSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " isOk = true", + " }", + " }", + " if (isOk) {", + " console.log(`Everything is OK, let's continue`)", + " break; // lets break out of retry loop loop", + " } else {", + " console.log(`Everything is NOT OK, let's wait for ${maxRetryWait}ms, and try again...`)", + " await wait(maxRetryWait)", + " const pmResponse = await makeRequest()", + " jsonData = JSON.parse(pmResponse.body)", + " }", + " }", + "}", + "", + "async function makeRequest() {", + " const requestParams = {", + " method: 'GET', ", + " url: `${environment.HOST_CENTRAL_LEDGER}/participants/ttkfxpayer/accounts`,", + " header: {", + " 'Content-Type': 'application/json',", + " },", + " };", + " ", + " return new Promise((resolve, reject) => {", + " pm.sendRequest(requestParams, (error, response) => {", + " if (error) reject(error)", + " resolve(response)", + " })", + " })", + "}", + "", + "function wait(ms) {", + " return new Promise((resolve) => {", + " setTimeout(resolve, ms)", + " });", + "}", + "", + "main()" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json similarity index 90% rename from collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json index 689b051d..6a35cea6 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json @@ -1144,6 +1144,116 @@ } ] } + }, + { + "id": 31, + "name": "ttkpayeefsp oracle_registration", + "meta": { + "info": "ttkpayeefsp oracle_registration" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add payeeIdentifier in payeeIdType Oracle" + }, + "description": "Add payeeIdentifier in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier1}", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier1}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentTypeParticipants}", + "Accept": "{$inputs.acceptParticipants}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.ttkpayeefspName}" + }, + "body": { + "fspId": "{$inputs.ttkpayeefspName}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "ignoreCallbacks": true + } + ], + "fileInfo": { + "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + } + }, + { + "id": 31, + "name": "ttkpayeefsp oracle_registration", + "meta": { + "info": "ttkpayeefsp oracle_registration" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add payeeIdentifier in payeeIdType Oracle" + }, + "description": "Add payeeIdentifier in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier2}", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier2}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentTypeParticipants}", + "Accept": "{$inputs.acceptParticipants}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.ttkpayeefspName}" + }, + "body": { + "fspId": "{$inputs.ttkpayeefspName}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "ignoreCallbacks": true + } + ], + "fileInfo": { + "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + } } ], "fileInfo": { diff --git a/collections/hub/provisioning/master.json b/collections/hub/provisioning/for_golden_path/master.json similarity index 100% rename from collections/hub/provisioning/master.json rename to collections/hub/provisioning/for_golden_path/master.json diff --git a/collections/hub/provisioning_sdkbulk/master.json b/collections/hub/provisioning/for_sdk_bulk/master.json similarity index 100% rename from collections/hub/provisioning_sdkbulk/master.json rename to collections/hub/provisioning/for_sdk_bulk/master.json diff --git a/collections/hub/provisioning_sdkbulk/ttksim1.json b/collections/hub/provisioning/for_sdk_bulk/ttksim1.json similarity index 99% rename from collections/hub/provisioning_sdkbulk/ttksim1.json rename to collections/hub/provisioning/for_sdk_bulk/ttksim1.json index f72d6e07..9d031eaf 100644 --- a/collections/hub/provisioning_sdkbulk/ttksim1.json +++ b/collections/hub/provisioning/for_sdk_bulk/ttksim1.json @@ -595,7 +595,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim1.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim1.json" } }, { @@ -1466,7 +1466,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim1.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim1.json" } }, { @@ -1592,7 +1592,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim1.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim1.json" } }, { @@ -1647,7 +1647,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim1.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim1.json" } } ] diff --git a/collections/hub/provisioning_sdkbulk/ttksim2.json b/collections/hub/provisioning/for_sdk_bulk/ttksim2.json similarity index 99% rename from collections/hub/provisioning_sdkbulk/ttksim2.json rename to collections/hub/provisioning/for_sdk_bulk/ttksim2.json index 579451c6..57a4d73a 100644 --- a/collections/hub/provisioning_sdkbulk/ttksim2.json +++ b/collections/hub/provisioning/for_sdk_bulk/ttksim2.json @@ -595,7 +595,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim2.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim2.json" } }, { diff --git a/collections/hub/provisioning_sdkbulk/ttksim3.json b/collections/hub/provisioning/for_sdk_bulk/ttksim3.json similarity index 99% rename from collections/hub/provisioning_sdkbulk/ttksim3.json rename to collections/hub/provisioning/for_sdk_bulk/ttksim3.json index 051df86c..fc4c7915 100644 --- a/collections/hub/provisioning_sdkbulk/ttksim3.json +++ b/collections/hub/provisioning/for_sdk_bulk/ttksim3.json @@ -595,7 +595,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_sdkbulk/ttksim3.json" + "path": "hub/provisioning/for_sdk_bulk/ttksim3.json" } }, { diff --git a/collections/hub/provisioning_thirdparty/centralauth.json b/collections/hub/provisioning/for_thirdparty/centralauth.json similarity index 100% rename from collections/hub/provisioning_thirdparty/centralauth.json rename to collections/hub/provisioning/for_thirdparty/centralauth.json diff --git a/collections/hub/provisioning_thirdparty/dfspa.json b/collections/hub/provisioning/for_thirdparty/dfspa.json similarity index 100% rename from collections/hub/provisioning_thirdparty/dfspa.json rename to collections/hub/provisioning/for_thirdparty/dfspa.json diff --git a/collections/hub/provisioning_thirdparty/dfspb.json b/collections/hub/provisioning/for_thirdparty/dfspb.json similarity index 100% rename from collections/hub/provisioning_thirdparty/dfspb.json rename to collections/hub/provisioning/for_thirdparty/dfspb.json diff --git a/collections/hub/provisioning_thirdparty/dfspb_parties.json b/collections/hub/provisioning/for_thirdparty/dfspb_parties.json similarity index 100% rename from collections/hub/provisioning_thirdparty/dfspb_parties.json rename to collections/hub/provisioning/for_thirdparty/dfspb_parties.json diff --git a/collections/hub/provisioning_thirdparty/hub.json b/collections/hub/provisioning/for_thirdparty/hub.json similarity index 100% rename from collections/hub/provisioning_thirdparty/hub.json rename to collections/hub/provisioning/for_thirdparty/hub.json diff --git a/collections/hub/provisioning_thirdparty/master.json b/collections/hub/provisioning/for_thirdparty/master.json similarity index 100% rename from collections/hub/provisioning_thirdparty/master.json rename to collections/hub/provisioning/for_thirdparty/master.json diff --git a/collections/hub/provisioning_thirdparty/pisp.json b/collections/hub/provisioning/for_thirdparty/pisp.json similarity index 100% rename from collections/hub/provisioning_thirdparty/pisp.json rename to collections/hub/provisioning/for_thirdparty/pisp.json diff --git a/collections/hub/provisioning_dfsp/newdfsp.json b/collections/hub/provisioning/new_participants/new_dfsp.json similarity index 99% rename from collections/hub/provisioning_dfsp/newdfsp.json rename to collections/hub/provisioning/new_participants/new_dfsp.json index efc15bf3..aa24c5bf 100644 --- a/collections/hub/provisioning_dfsp/newdfsp.json +++ b/collections/hub/provisioning/new_participants/new_dfsp.json @@ -354,7 +354,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } }, { @@ -1336,7 +1336,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } }, { @@ -1462,7 +1462,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } } ] diff --git a/collections/hub/provisioning_fxp/newfxp.json b/collections/hub/provisioning/new_participants/new_fxp.json similarity index 100% rename from collections/hub/provisioning_fxp/newfxp.json rename to collections/hub/provisioning/new_participants/new_fxp.json diff --git a/collections/pm4ml/fx_golden_path/feature_tests/happy_path/sdk_fx_transfer.json b/collections/pm4ml/golden_path/forex/feature_tests/happy_path/sdk_fx_transfer.json similarity index 100% rename from collections/pm4ml/fx_golden_path/feature_tests/happy_path/sdk_fx_transfer.json rename to collections/pm4ml/golden_path/forex/feature_tests/happy_path/sdk_fx_transfer.json diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_error.json similarity index 100% rename from collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_error.json rename to collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_error.json diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_non_success_states.json similarity index 100% rename from collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_non_success_states.json rename to collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_non_success_states.json diff --git a/collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_timeout_scenarios.json similarity index 100% rename from collections/pm4ml/fx_golden_path/feature_tests/negative_scenarios/fxp_timeout_scenarios.json rename to collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_timeout_scenarios.json diff --git a/collections/pm4ml/p2p/sdk_post_transfer.json b/collections/pm4ml/golden_path/p2p/sdk_post_transfer.json similarity index 100% rename from collections/pm4ml/p2p/sdk_post_transfer.json rename to collections/pm4ml/golden_path/p2p/sdk_post_transfer.json diff --git a/collections/pm4ml/golden_path/proxy/fxp/sdk_post_transfer.json b/collections/pm4ml/golden_path/proxy/fxp/sdk_post_transfer.json new file mode 100644 index 00000000..34ea59f2 --- /dev/null +++ b/collections/pm4ml/golden_path/proxy/fxp/sdk_post_transfer.json @@ -0,0 +1,190 @@ +{ + "options": {}, + "name": "sdk-proxy-fxp", + "test_cases": [ + { + "id": 1, + "name": "Proxy-FXP Transfer Happy Path", + "meta": { + "info": "Proxy-FXP Transfer Happy Path" + }, + "requests": [ + { + "id": 1, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": true + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "body": { + "homeTransactionId": "{$inputs.HOME_TRANSACTION_ID}", + "from": { + "type": "CONSUMER", + "idType": "MSISDN", + "idValue": "{$inputs.P2P_SOURCE_PARTY_ID_1}", + "displayName": "{$inputs.FROM_DISPLAY_NAME}", + "firstName": "{$inputs.FROM_FIRST_NAME}", + "middleName": "{$inputs.FROM_MIDDLE_NAME}", + "lastName": "{$inputs.FROM_LAST_NAME}", + "dateOfBirth": "{$inputs.FROM_DOB}", + "fspId": "{$inputs.FROM_FSP_ID}" + }, + "to": { + "type": "CONSUMER", + "idType": "MSISDN", + "idValue": "{$inputs.FX_DESTINATION_PARTY_ID_1}", + "merchantClassificationCode": 123 + }, + "amountType": "SEND", + "currency": "{$inputs.P2P_CURRENCY}", + "amount": "{$inputs.P2P_AMOUNT}", + "transactionType": "TRANSFER", + "note": "{$inputs.NOTE}", + "skipPartyLookup": false + }, + "params": { + "Type": "", + "ID": "" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 2, + "description": "Accept Party", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "body": { + "acceptParty": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_CONVERSION_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_CONVERSION_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 3, + "description": "Accept FX Conversion Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "body": { + "acceptConversion": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(response.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + } + ] + } + }, + { + "id": 4, + "description": "Accept Quote", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "operationPath": "/transfers/{transferId}", + "path": "/transfers/{$prev.1.response.body.transferId}", + "method": "put", + "params": { + "transferId": "{$prev.1.response.body.transferId}" + }, + "body": { + "acceptQuote": true + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Current state should be COMPLETED", + "exec": [ + "expect(response.body.currentState).to.equal('COMPLETED')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/happy_path/discovery.json b/collections/proxy/proxy_golden_path/happy_path/discovery.json deleted file mode 100644 index 0249c001..00000000 --- a/collections/proxy/proxy_golden_path/happy_path/discovery.json +++ /dev/null @@ -1,326 +0,0 @@ -{ - "name": "Party Lookup Happy Path", - "test_cases": [ - { - "id": "1", - "name": "Party Lookup for ProxyAB if not cached", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as Payeefsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "Callback content-type to be parties", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" - ] - }, - { - "id": 6, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle has Proxy Payee DFSP set", - "exec": [ - "expect(response.fspId).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" - ] - } - ] - } - } - ] - } - ] - }, - { - "id": "2", - "name": "Party Lookup for other proxy in Scheme if not cached", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should not be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as TODO", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "an error callback is expected", - "exec": [ - "expect(callback.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_CODE}')", - "expect(callback.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_DESCRIPTION}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "payerfsp", - "FSPIOP-Destination": "payeefsp" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle should not have payeeDFSP set", - "exec": [ - "expect(response.fspId).to.equal('')" - ] - } - ] - } - } - ] - } - ] - }, - { - "id": "3", - "name": "Party Lookup for Proxy in Scheme if it is cached", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should not be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as TODO", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "payerfsp", - "FSPIOP-Destination": "payeefsp" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle should not have payeeDFSP set", - "exec": [ - "expect(response.fspId).to.equal('')" - ] - } - ] - } - } - ] - } - ] - } - ] - } \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/happy_path/quotes.json b/collections/proxy/proxy_golden_path/happy_path/quotes.json deleted file mode 100644 index 044cc43b..00000000 --- a/collections/proxy/proxy_golden_path/happy_path/quotes.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "name": "Quotes Happy Path", - "test_cases": [ - { - "id": 1, - "name": "Proxy Quoting Service", - "requests": [ - { - "id": 1, - "meta": { - "info": "This request allows us to send a request for Quote (payerfsp to payeefsp), for the calculation of possible fees and FSP commission involved in performing an interoperable financial transaction." - }, - "description": "Send quote", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.PROXY_PAYERFSP_PARTY_FIRST_NAME}", - "lastName": "{$inputs.PROXY_PAYERFSP_PARTY_LAST_NAME}" - }, - "dateOfBirth": "{$inputs.PROXY_PAYERFSP_PARTY_DOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" - } - }, - "amountType": "RECEIVE", - "amount": { - "amount": "{$inputs.PROXY_AMOUNT}", - "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - } - }, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response statusText be Accepted", - "exec": [ - "expect(response.statusText).to.equal('Accepted')" - ] - }, - { - "id": 3, - "description": "Callback Content Length not 0", - "exec": [ - "expect(callback.headers['Content-Length']).to.not.equal('0')" - ] - }, - { - "id": 4, - "description": "Callback FSP Source equal to request FSP Destination", - "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('{$request.headers['FSPIOP-Destination']}')" - ] - }, - { - "id": 5, - "description": "Callback FSP Destination equal to request FSP Source", - "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" - ] - }, - { - "id": 5, - "description": "Callback body should contain transferAmount", - "exec": [ - "expect(callback.body).to.have.property('transferAmount')" - ] - }, - { - "id": 6, - "description": "Callback transferAmount (amount & currency)to match the request", - "exec": [ - "expect(callback.body.transferAmount.amount).to.equal('{$request.body.amount.amount}')", - "expect(callback.body.transferAmount.currency).to.equal('{$request.body.amount.currency}')" - ] - }, - { - "id": 7, - "description": "Callback content-type to be quotes", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" - ] - }, - { - "id": 8, - "description": "Request amountType to be RECEIVE", - "exec": [ - "expect('{$request.body.amountType}').to.equal('RECEIVE')" - ] - }, - { - "id": 9, - "description": "Request transactionType scenario to be TRANSFER", - "exec": [ - "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" - ] - }, - { - "id": 10, - "description": "Request transactionType initiator to be PAYER", - "exec": [ - "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" - ] - }, - { - "id": 11, - "description": "Request transactionType initiatorType to be CONSUMER", - "exec": [ - "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" - ] - } - ] - }, - "path": "/quotes", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "scripts": { - "preRequest": { - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')", - "}" - ] - }, - "postRequest": { - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)", - "}" - ] - } - } - }, - { - "id": 5, - "meta": { - "info": "Get health status of Quoting Service" - }, - "description": "Get health status of Quoting Service", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "central_admin" - }, - "operationPath": "/health", - "path": "/health", - "method": "get", - "url": "{$inputs.HOST_QUOTING_SERVICE_HANDLER}", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Response services to be an array", - "exec": [ - "expect(response.body.services).to.be.an('array');" - ] - }, - { - "id": 3, - "description": "Expected services to have data store and status is OK", - "exec": [ - "if(!environment.SIMPLE_ROUTING_MODE_ENABLED) {", - " expect(environment.datastoreOKx).to.be.an('object')", - "}" - ] - } - ] - }, - "scriptingEngine": "javascript", - "headers": { - "FSPIOP-Source": "{$inputs.payerfsp}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "scripts": { - "postRequest": { - "exec": [ - " const datastoreOK = response.body.services.find(item => {\r", - " return item.name=='datastore' && item.status=='OK'; \r", - " });\r", - " \r", - "environment.datastoreOKx=datastoreOK; \r", - "console.log(environment.datastoreOKx);" - ] - } - } - }, - { - "id": 6, - "meta": { - "info": "Get Quote" - }, - "description": "Get Quote", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes/{ID}", - "path": "/quotes/{$prev.4.request.body.quoteId}", - "method": "get", - "params": { - "ID": "{$prev.4.request.body.quoteId}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "ignoreCallbacks": true, - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.payerfsp}", - "FSPIOP-Destination": "{$inputs.toFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "Content-Type": "{$inputs.contentTypeQuotes}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } - ] - } - }, - { - "id": 7, - "meta": { - "info": "Send quote - missing date" - }, - "description": "Send quote - missing date", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes", - "method": "post", - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Content-Type": "{$inputs.contentTypeQuotes}", - "FSPIOP-Source": "{$inputs.toFspId}", - "FSPIOP-Destination": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.payeeIdentifier}", - "fspId": "{$inputs.toFspId}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.toIdType}", - "partyIdentifier": "{$inputs.payeeIdentifier}", - "fspId": "{$inputs.toFspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "5", - "currency": "{$inputs.currency}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - }, - { - "id": 3, - "description": "Check Error code 3102", - "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3102')" - ] - }, - { - "id": 4, - "description": "Error message date is required", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('date');" - ] - }, - { - "id": 5, - "description": "Missing mandatory element error", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element ');" - ] - } - ] - }, - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "path": "/quotes", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "ignoreCallbacks": true, - "scripts": { - "preRequest": { - "exec": [ - "", - "" - ] - }, - "postRequest": { - "exec": [ - "" - ] - } - } - }, - { - "id": 8, - "meta": { - "info": "Send quote Copy" - }, - "description": "Send quote Copy", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes", - "method": "post", - "headers": { - "Content-Type": "{$inputs.contentTypeQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", - "FSPIOP-Destination": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" - }, - "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "payer": { - "partyIdInfo": { - "partyIdType": "{$inputs.fromIdType}", - "partyIdentifier": "{$inputs.payerIdentifier}", - "fspId": "{$inputs.SIMPAYER_NAME}" - }, - "personalInfo": { - "complexName": { - "firstName": "{$inputs.fromFirstName}", - "lastName": "{$inputs.fromLastName}" - }, - "dateOfBirth": "{$inputs.fromDOB}" - } - }, - "payee": { - "partyIdInfo": { - "partyIdType": "{$inputs.toIdType}", - "partyIdentifier": "{$inputs.payeeIdentifier}", - "fspId": "{$inputs.toFspId}" - } - }, - "amountType": "SEND", - "amount": { - "amount": "5", - "currency": "{$inputs.currency}" - }, - "transactionType": { - "scenario": "TRANSFER", - "initiator": "PAYER", - "initiatorType": "CONSUMER" - }, - "note": "{$inputs.note}" - }, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - }, - { - "id": 2, - "description": "Check Error code 3102", - "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3102')" - ] - }, - { - "id": 3, - "description": "Check Missing mandatory element - Invalid accept header", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('/header must have required property \\'accept\\'');" - ] - } - ] - }, - "params": { - "Type": "MSISDN", - "ID": "{$inputs.toIdValue}" - }, - "path": "/quotes", - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "ignoreCallbacks": true, - "scripts": { - "preRequest": { - "exec": [ - "", - "" - ] - }, - "postRequest": { - "exec": [ - "" - ] - } - } - }, - { - "id": 9, - "meta": { - "info": "Get Quote - Missing content type" - }, - "description": "Get Quote - Missing content type", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes/{ID}", - "path": "/quotes/{$prev.4.request.body.quoteId}", - "method": "get", - "params": { - "ID": "{$prev.4.request.body.quoteId}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "ignoreCallbacks": false, - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.payerfsp}", - "FSPIOP-Destination": "{$inputs.toFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - }, - { - "id": 2, - "description": "Missing mandatory element error", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element ');" - ] - }, - { - "id": 3, - "description": "Check Error code 3102", - "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3102')" - ] - } - ] - } - }, - { - "id": 10, - "meta": { - "info": "Get Quote - Invalid content type" - }, - "description": "Get Quote - Invalid content type", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/quotes/{ID}", - "path": "/quotes/{$prev.4.request.body.quoteId}", - "method": "get", - "params": { - "ID": "{$prev.4.request.body.quoteId}" - }, - "url": "{$inputs.HOST_QUOTING_SERVICE}", - "ignoreCallbacks": false, - "headers": { - "Accept": "{$inputs.acceptQuotes}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.payerfsp}", - "FSPIOP-Destination": "{$inputs.toFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "Content-Type": "{$inputs.contentTypeTransfers}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - }, - { - "id": 2, - "description": "Check Malformed syntax error", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Malformed syntax');" - ] - }, - { - "id": 3, - "description": "Check Error code 3101", - "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3101')" - ] - } - ] - } - } - ], - "fileInfo": { - "path": "hub/golden_path/quoting_service/quoting_service.json", - "labels": [ - "quotes" - ] - } - }, - { - "id": "2", - "name": "Party Lookup for other proxy in Scheme if not cached", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should not be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as TODO", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "an error callback is expected", - "exec": [ - "expect(callback.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_CODE}')", - "expect(callback.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ERROR_DESCRIPTION}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "payerfsp", - "FSPIOP-Destination": "payeefsp" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle should not have payeeDFSP set", - "exec": [ - "expect(response.fspId).to.equal('')" - ] - } - ] - } - } - ] - } - ] - }, - { - "id": "3", - "name": "Party Lookup for Proxy in Scheme if it is cached", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should not be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as TODO", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('TODO')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.toIdType}", - "ID": "{$inputs.toIdValue}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "payerfsp", - "FSPIOP-Destination": "payeefsp" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle should not have payeeDFSP set", - "exec": [ - "expect(response.fspId).to.equal('')" - ] - } - ] - } - } - ] - } - ] - } - ] - } \ No newline at end of file diff --git a/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json b/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json deleted file mode 100644 index 85965345..00000000 --- a/collections/proxy/proxy_golden_path/negative_scenarios/discovery.json +++ /dev/null @@ -1,727 +0,0 @@ -{ - "name": "Party Lookup Negative Scenarios", - "test_cases": [ - { - "id": "1", - "name": "Test Case for Bad Request - 400", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 400", - "exec": [ - "expect(response.status).to.equal(400)" - ] - } - ] - } - } - ] - }, - { - "id": "2", - "name": "Test Case for error in Payer Scheme", - "requests": [ - { - "id": "1", - "description": "Negative test case for error code 2xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" - ] - } - ] - } - }, - { - "id": "2", - "description": "Negative test case for error code 3xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" - ] - } - ] - } - }, - { - "id": "3", - "description": "Negative test case for error code 4xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" - ] - } - ] - } - }, - { - "id": "4", - "description": "Negative test case for error code 5xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" - ] - } - ] - } - } - ] - }, - { - "id": "3", - "name": "Test Case for scenario where the receiving dfsp is not in payer proxy cache", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION}')" - ] - } - ] - } - } - ] - }, - { - "id": "4", - "name": "Test Case for scenario when there is an error in proxy", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Source Header should be proxy", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('${inputs.FSPIOP_PROXY_HEADER}')" - ] - }, - { - "id": 3, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 4, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('${inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION}')" - ] - } - ] - } - } - ] - }, - { - "id": "5", - "name": "Test Case for scenario when there is an error in payee scheme", - "requests": [ - { - "id": "1", - "description": "Negative test case for error code 2xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" - ] - } - ] - } - }, - { - "id": "2", - "description": "Negative test case for error code 3xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" - ] - } - ] - } - }, - { - "id": "3", - "description": "Negative test case for error code 4xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" - ] - } - ] - } - }, - { - "id": "4", - "description": "Negative test case for error code 5xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" - ] - } - ] - } - } - ] - }, - { - "id": "6", - "name": "Test Case for scenario when there is an error in payee dfsp", - "requests": [ - { - "id": "1", - "description": "Negative test case for error code 5xxx", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" - ] - } - ] - } - } - ] - }, - { - "id": "7", - "name": "Party Lookup for scenario when there is an eror in Oracle", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION}')" - ] - } - ] - } - } - ] - }, - { - "id": "8", - "name": "Party Lookup for scenario when there are multiple calls to GET /parties with same Type and ID but different error codes", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as Payeefsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "Callback content-type to be parties", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" - ] - }, - { - "id": 6, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" - ] - } - ] - } - }, - { - "id": "2", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Response Proxy Header should be set", - "exec": [ - "expect(callback.headers['fspiop-proxy']).to.equal('{$inputs.PROXY_HEADER}')" - ] - }, - { - "id": 3, - "description": "Response Source Header same as Payeefsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Source']}').to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" - ] - }, - { - "id": 4, - "description": "Response Destination Header same as Payerfsp Id", - "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" - ] - }, - { - "id": 5, - "description": "Callback content-type to be parties", - "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" - ] - }, - { - "id": 6, - "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", - "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" - ] - } - ] - } - } - ] - }, - { - "id": "9", - "name": "Party Lookup for Payer Cache no longer valid", - "requests": [ - { - "id": "1", - "description": "Send party lookup request", - "operationPath": "/parties/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Callback response has errorCode and errorDescription", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION}')" - ] - } - ] - } - }, - { - "id": "2", - "name": "Oracle Lookup", - "requests": [ - { - "id": "1", - "description": "Send Oracle lookup request", - "operationPath": "/participants/{Type}/{ID}", - "method": "get", - "params": { - "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" - }, - "headers": { - "Accept": "application/vnd.interoperability.participants+json;version=1.0", - "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", - "Date": "{$function.generic.curDate}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response status to be 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - }, - { - "id": 2, - "description": "Oracle should not have mapping for the party ID", - "exec": [ - "expect(response.fspId).to.equal('')" - ] - } - ] - } - } - ] - } - ] - } - ] - } \ No newline at end of file diff --git a/environments/hub.json b/environments/hub.json index b2d26ec3..5a7e1a14 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -213,6 +213,9 @@ "TTKSIM3_SDK_TESTAPI_URL": "http://$release_name-$param_simNameTTKSim3-sdk-api-svc:4002", "TTKSIM3_SDK_TESTAPI_WS_URL": "ws://$release_name-$param_simNameTTKSim3-sdk-api-svc:4002", "TTKSIM2_PARTY_NOT_FOUND": "partynotfound", - "TTKSIM2_PARTY_TIMES_OUT": "partytimesout" + "TTKSIM2_PARTY_TIMES_OUT": "partytimesout", + "ttkpayeefspIdentifier1": "7891234", + "ttkpayeefspIdentifier2": "5201", + "ttkpayeefspName": "ttkpayeefsp" } } diff --git a/environments/hub/forex/fxp-env.json b/environments/hub/forex/fxp-env.json new file mode 100644 index 00000000..2c738372 --- /dev/null +++ b/environments/hub/forex/fxp-env.json @@ -0,0 +1,30 @@ +{ + "inputValues": { + "FX_PAYER_DFSP_ID": "testingtoolkitdfsp", + "FX_TESTFXP1_ID": "test-fxp", + "FX_SOURCE_CURRENCY": "EUR", + "FX_SOURCE_AMOUNT": "10", + "FX_TARGET_CURRENCY": "EUR", + "FX_EXPIRATION": "2024-08-22T12:33:23.819Z", + "acceptFxParties": "application/vnd.interoperability.parties+json;version=1.0", + "acceptFxQuotes": "application/vnd.interoperability.fxQuotes+json;version=2.0", + "acceptFxTransfers": "application/vnd.interoperability.transfers+json;version=1.0", + "contentTypeFxParticipants": "application/vnd.interoperability.parties+json;version=1.0", + "contentTypeFxParties": "application/vnd.interoperability.parties+json;version=1.0", + "contentTypeFxQuotes": "application/vnd.interoperability.fxQuotes+json;version=2.0", + "contentTypeFxTransfers": "application/vnd.interoperability.transfers+json;version=1.0", + "currency": "USD", + "fxpCurrency": "USD", + "hub_operator": "NOT_APPLICABLE", + "HOST_CENTRAL_LEDGER": "http://moja1-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja1-account-lookup-service", + "HOST_ORACLE": "http://moja1-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja1-quoting-service", + "dfspEmail": "test@infitx.com", + "CALLBACK_ENDPOINT_BASE_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "expiration": "2024-07-26T11:12:15.158Z", + "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA" + } +} \ No newline at end of file diff --git a/environments/hub/proxy/onboard_proxy_ttk.json b/environments/hub/proxy/onboard_proxy_ttk.json new file mode 100644 index 00000000..3e39b85a --- /dev/null +++ b/environments/hub/proxy/onboard_proxy_ttk.json @@ -0,0 +1,19 @@ +{ + "inputValues": { + "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", + "HOST_ORACLE": "http://moja-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja-quoting-service", + "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", + "dfspEmail": "test@infitx.com", + "DFSP_NAME": "proxyttk", + "currency": "USD", + "DFSP_CALLBACK_URL": "http://moja-ml-testing-toolkit-backend:4040", + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "expiration": "2024-07-26T11:12:15.158Z", + "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", + "hub_operator": "NOT_APPLICABLE", + "isProxy": true + } +} \ No newline at end of file diff --git a/environments/proxy_env.json b/environments/hub/proxy/proxy_env_as_payee.json similarity index 50% rename from environments/proxy_env.json rename to environments/hub/proxy/proxy_env_as_payee.json index 8c2731a7..09ae25c9 100644 --- a/environments/proxy_env.json +++ b/environments/hub/proxy/proxy_env_as_payee.json @@ -1,18 +1,20 @@ { "inputValues": { - "FSPIOP_PROXY_HEADER": "TBD", + "PROXY_HEADER": "proxyttk", + "PROXY_PAYERFSP_ID": "nonexistentpayerfsp", "PROXY_PAYERFSP_PARTY_ID_TYPE": "MSISDN", "PROXY_PAYERFSP_PARTY_ID": "123456", "PROXY_PAYERFSP_PARTY_FIRST_NAME": "Proxy_Payer_First", "PROXY_PAYERFSP_PARTY_LAST_NAME": "Proxy_Payer_Last", "PROXY_PAYERFSP_PARTY_DOB": "10-10-2000", + "PROXY_PAYEEFSP_ID": "ttkpayeefsp", "PROXY_PAYEEFSP_PARTY_ID_TYPE": "MSISDN", - "PROXY_PAYEEFSP_PARTY_ID": "788912", + "PROXY_PAYEEFSP_PARTY_ID": "7891234", "PROXY_PAYEEFSP_PARTY_FIRST_NAME": "Proxy_Payee_First", "PROXY_PAYEEFSP_PARTY_LAST_NAME": "Proxy_Payee_Last", "PROXY_PAYEEFSP_PARTY_DOB": "10-10-2000", "PROXY_AMOUNT": "100", - "PROXY_CURRENCY": "USD", + "PROXY_AMOUNT_CURRENCY": "XXX", "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX": "TBD", "PAYER_SCHEME_ERROR_CODE_2XXX": "TBD", "PAYER_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", @@ -38,14 +40,29 @@ "PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", "PAYEE_SCHEME_ERROR_CODE_5XXX": "TBD", "PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "TBD", - "PAYEE_DFSP_ERROR_CODE_5XXX": "TBD", - "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "5201", + "PAYEE_DFSP_ERROR_AMOUNT_5XXX": "5201", + "PAYEE_DFSP_ERROR_CODE_5XXX": "5201", + "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "Generic error in Payee DFSP", "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE": "5107", "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION": "TBD", "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR": "TBD", "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE": "TBD", "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD" + "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD", + "PROXY1_DFSP_ID": "proxyttk", + "currency": "USD", + "hub_operator": "NOT_APPLICABLE", + "HOST_CENTRAL_LEDGER": "http://moja1-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja1-account-lookup-service", + "HOST_ORACLE": "http://moja1-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja1-quoting-service", + "HOST_TRANSFERS_SERVICE": "http://moja1-ml-api-adapter-service", + "dfspEmail": "test@infitx.com", + "CALLBACK_ENDPOINT_BASE_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "expiration": "2024-07-26T11:12:15.158Z", + "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA" } } \ No newline at end of file diff --git a/environments/hub/proxy/proxy_env_as_payer.json b/environments/hub/proxy/proxy_env_as_payer.json new file mode 100644 index 00000000..0c0ca785 --- /dev/null +++ b/environments/hub/proxy/proxy_env_as_payer.json @@ -0,0 +1,76 @@ +{ + "inputValues": { + "PROXY_HEADER": "proxyttk", + "PROXY_PAYERFSP_ID": "testingtoolkitdfsp", + "PROXY_PAYERFSP_PARTY_ID_TYPE": "MSISDN", + "PROXY_PAYERFSP_PARTY_ID": "123456", + "PROXY_PAYERFSP_PARTY_FIRST_NAME": "Proxy_Payer_First", + "PROXY_PAYERFSP_PARTY_LAST_NAME": "Proxy_Payer_Last", + "PROXY_PAYERFSP_PARTY_DOB": "10-10-2000", + "PROXY_PAYEEFSP_ID": "nonexistentpayeefsp", + "PROXY_PAYEEFSP_PARTY_ID_TYPE": "MSISDN", + "PROXY_PAYEEFSP_PARTY_ID": "123456", + "PROXY_PAYEEFSP_PARTY_FIRST_NAME": "Proxy_Payee_First", + "PROXY_PAYEEFSP_PARTY_LAST_NAME": "Proxy_Payee_Last", + "PROXY_PAYEEFSP_PARTY_DOB": "10-10-2000", + "PROXY_AMOUNT": "100", + "PROXY_AMOUNT_CURRENCY": "XXX", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_2XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_3XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_4XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX": "TBD", + "PAYER_SCHEME_ERROR_CODE_5XXX": "TBD", + "PAYER_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE": "3201", + "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY": "3100", + "PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY": "3100", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE": "3100", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION": "Generic Error in Proxy", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX": "2001", + "PAYEE_SCHEME_ERROR_CODE_2XXX": "2001", + "PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX": "Generic 200X error in Payeefsp Scheme", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX": "3001", + "PAYEE_SCHEME_ERROR_CODE_3XXX": "3001", + "PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX": "Generic 300X error in Payeefsp Scheme", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX": "4001", + "PAYEE_SCHEME_ERROR_CODE_4XXX": "4001", + "PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX": "Generic 400X error in Payeefsp Scheme", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX": "5001", + "PAYEE_SCHEME_ERROR_CODE_5XXX": "5001", + "PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX": "Generic 500X error in Payeefsp Scheme", + "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "5101", + "PAYEE_DFSP_ERROR_CODE_5XXX": "5101", + "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "Generic error in Payee DFSP", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE": "5107", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION": "TBD", + "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD", + "PROXY1_DFSP_ID": "proxyttk", + "currency": "USD", + "hub_operator": "NOT_APPLICABLE", + "HOST_CENTRAL_LEDGER": "http://moja1-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja1-account-lookup-service", + "HOST_ORACLE": "http://moja1-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja1-quoting-service", + "HOST_TRANSFERS_SERVICE": "http://moja1-ml-api-adapter-service", + "PROXY1_CALLBACK_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "dfspEmail": "test@infitx.com", + "TEST_DFSP_ID": "payeefspproxyttk", + "CALLBACK_ENDPOINT_BASE_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "expiration": "2024-07-26T11:12:15.158Z", + "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", + "RETRY_MAX_WAIT_IN_MS": 1000 + } +} \ No newline at end of file diff --git a/environments/pm4ml/proxy/fxp/proxy-fxp-env.json b/environments/pm4ml/proxy/fxp/proxy-fxp-env.json new file mode 100644 index 00000000..e88de0b6 --- /dev/null +++ b/environments/pm4ml/proxy/fxp/proxy-fxp-env.json @@ -0,0 +1,27 @@ +{ + "inputValues": { + "ENABLE_WS_ASSERTIONS": true, + "WS_ASSERTION_TIMEOUT": 5000, + "RETRY_MAX_ATTEMPTS": 100, + "FROM_DISPLAY_NAME": "Display-Test", + "FROM_FIRST_NAME": "Firstname-Test", + "FROM_MIDDLE_NAME": "Middlename-Test", + "FROM_LAST_NAME": "Lastname-Test", + "FROM_DOB": "1984-01-01", + "FROM_FSP_ID": "test-mwk-dfsp", + "HOME_TRANSACTION_ID": "123ABC", + "NOTE": "test", + "P2P_AMOUNT": "10", + "P2P_CURRENCY": "MWK", + "P2P_SOURCE_PARTY_ID_1": "16665551001", + "P2P_DESTINATION_PARTY_ID_1": "5678912", + "FX_SOURCE_PARTY_ID_1": "16665551001", + "FX_DESTINATION_PARTY_ID_1": "5678912", + "FXP1_ID": "testfxp", + "FX_PAYERDFSP_ID": "testpayer", + "FX_PAYEEDFSP_ID": "testpayee", + "FX_SOURCE_CURRENCY": "EUR", + "FX_TARGET_CURRENCY": "XXX", + "FX_SOURCE_AMOUNT": "10" + } +} \ No newline at end of file diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json b/rules/hub/rules_callback/default.json similarity index 78% rename from rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json rename to rules/hub/rules_callback/default.json index 4192ac58..0efd43d7 100644 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ b/rules/hub/rules_callback/default.json @@ -1232,9 +1232,223 @@ "version": 1 }, { - "ruleId": 1, + "ruleId": 21, "priority": 1, - "description": "get /parties/{Type}/{ID}", + "description": "get /parties/{Type}/{ID} for ttkfxpayer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "ttkfxpayer", + "path": "FSPIOP-Source" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", + "FSPIOP-Source": "ttkfxpayee", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "party": { + "partyIdInfo": { + "fspId": "ttkfxpayee" + }, + "merchantClassificationCode": null, + "name": "Justin Pierre", + "personalInfo": { + "complexName": { + "firstName": "Justin", + "middleName": "Pierre", + "lastName": "Trudeau" + }, + "dateOfBirth": "1971-12-25", + "kycInformation": "ENCRYPTED KYC INFORMATION" + }, + "supportedCurrencies": [ + "XTS" + ] + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 50, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Happy Path", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "123456", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp", + "fspiop-proxy": "proxyttk" + }, + "body": { + "party": { + "partyIdInfo": { + "partyIdType": "MSISDN", + "partyIdentifier": "123456", + "fspId": "nonexistentpayeefsp" + }, + "name": "veniam consectetur officia si", + "personalInfo": { + "complexName": { + "lastName": "Proxy_Payee_Last", + "firstName": "Proxy_Payee_First" + }, + "dateOfBirth": "2000-10-10" + }, + "merchantClassificationCode": "873" + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payee side scheme with Payer side proxy as TTK and Payee DFSP as proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "7891234", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "party": { + "partyIdInfo": { + "partyIdType": "MSISDN", + "partyIdentifier": "7891234", + "fspId": "payeefspproxyttk" + }, + "name": "veniam consectetur officia si", + "personalInfo": { + "complexName": { + "lastName": "Proxy_Payee_Last", + "firstName": "Proxy_Payee_First" + }, + "dateOfBirth": "2000-10-10" + }, + "merchantClassificationCode": "873" + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 22, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Default", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -1269,7 +1483,9 @@ } } }, - "scripts": {} + "scripts": { + "scriptingEngine": "postman" + } }, "type": "MOCK_CALLBACK" }, @@ -1277,11 +1493,9 @@ "version": 1 }, { - "type": "callback", - "version": 1, "ruleId": 2, "priority": 1, - "description": "post /quotes", + "description": "post /quotes - Default", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -1323,9 +1537,7 @@ "currency": "{$request.body.amount.currency}", "amount": "{$environment.quotePayeeFspCommission}" }, - "expiration": "{$environment.quoteExpiration}", - "ilpPacket": "AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA", - "condition": "f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA" + "expiration": "{$environment.quoteExpiration}" }, "scripts": { "exec": [ @@ -1349,15 +1561,171 @@ } }, "delay": 0, - "type": "FIXED_CALLBACK" - } + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 }, { + "ruleId": 53, + "priority": 1, + "description": "Post /transfers - invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "15", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "javascript" + }, + "body": { + "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "COMMITTED", + "extensionList": null + } + }, + "type": "MOCK_CALLBACK" + }, "type": "callback", - "version": 1, + "version": 1 + }, + { + "ruleId": 57, + "priority": 1, + "description": "Post /transfers No callback", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "16", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 56, + "priority": 1, + "description": "Post /transfers matching fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "path": "condition" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "body": { + "fulfilment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "COMMITTED", + "extensionList": null + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { "ruleId": 3, "priority": 1, - "description": "post /transfers", + "description": "post /transfers - Default", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -1381,17 +1749,21 @@ "event": { "method": "put", "path": "/transfers/{ID}", - "params": {}, + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, "delay": 0, "type": "MOCK_CALLBACK" - } + }, + "type": "callback", + "version": 1 }, { - "type": "callback", - "version": 1, "ruleId": 4, "priority": 1, - "description": "post /transactionRequests", + "description": "post /transactionRequests - Default", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -1418,11 +1790,16 @@ "params": { "body": { "transactionRequestState": "RECEIVED" + }, + "scripts": { + "scriptingEngine": "postman" } }, "delay": 0, "type": "MOCK_CALLBACK" - } + }, + "type": "callback", + "version": 1 }, { "type": "callback", @@ -2027,6 +2404,116 @@ "type": "callback", "version": 1 }, + { + "ruleId": 54, + "priority": 1, + "description": "post /fxTransfers - invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "15", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "fulfilment": "AelJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 55, + "priority": 1, + "description": "post /fxTransfers No callback", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "16", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, { "ruleId": 51, "priority": 1, diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_response/default.json b/rules/hub/rules_response/default.json similarity index 100% rename from rules/mojaloop/ml-testing-toolkit/spec_files/rules_response/default.json rename to rules/hub/rules_response/default.json diff --git a/rules/hub/rules_validation/default.json b/rules/hub/rules_validation/default.json new file mode 100644 index 00000000..4569af05 --- /dev/null +++ b/rules/hub/rules_validation/default.json @@ -0,0 +1,1262 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in Proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "3100", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "FSPIOP-Source": "proxyttk", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3100", + "errorDescription": "Generic Error in Proxy" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 2, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 200X Error in Payee Scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "2001", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "2001", + "errorDescription": "Generic 200X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 3, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 300X Error in Payee Scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "3001", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3001", + "errorDescription": "Generic 300X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 4, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 400X Error in Payee Scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "4001", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "4001", + "errorDescription": "Generic 400X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 5, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 500X Error in Payee Scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "5001", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "5001", + "errorDescription": "Generic 500X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 6, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Error in Payee DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "5101", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "body": { + "errorInformation": { + "errorCode": "5101", + "errorDescription": "Generic error in Payee DFSP" + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 7, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in Proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "3100", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3100", + "errorDescription": "Generic Error in Proxy" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 8, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 200X Error in Payee dfsp scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "2001", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "2001", + "errorDescription": "Generic 200X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 9, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 300X Error in Payee dfsp scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "3001", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3001", + "errorDescription": "Generic 300X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 10, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 400X Error in Payee dfsp scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "4001", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "4001", + "errorDescription": "Generic 400X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 11, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - 500X Error in Payee dfsp scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "5001", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "5001", + "errorDescription": "Generic 500X error in Payeefsp Scheme" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 12, + "priority": 1, + "description": "post /quotes - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in payee dfsp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "5101", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "5101", + "errorDescription": "Generic error in Payee DFSP" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 13, + "priority": 1, + "description": "post /transfers - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in Proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "3100", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3100", + "errorDescription": "Generic Error in Proxy" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 14, + "priority": 1, + "description": "post /transfers - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in payee dfsp scheme", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "3100", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3100", + "errorDescription": "Generic Error in Proxy" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 15, + "priority": 1, + "description": "post /transfers - Testing Payer Scheme with Payee side Proxy as TTK - Negative Scenarios - Generic Error in payee dfsp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "5101", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "errorInformation": { + "errorCode": "3100", + "errorDescription": "Generic Error in Proxy" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 16, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payee Scheme with Payer side Proxy as TTK - Negative Scenarios - Error in Payee DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "5201", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "body": { + "errorInformation": { + "errorCode": "5201", + "errorDescription": "Generic error in Payee DFSP" + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 17, + "priority": 1, + "description": "post /quotes - Testing Payee Scheme with Payer side Proxy as TTK - Negative Scenarios - Generic Error in payee dfsp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "5201", + "path": "payee.partyIdInfo.partyIdentifier" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "errorInformation": { + "errorCode": "5201", + "errorDescription": "Generic error in Payee DFSP" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 18, + "priority": 1, + "description": "post /transfers - Testing Payee Scheme with Payer side Proxy as TTK - Negative Scenarios - Generic Error in payee dfsp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "5201", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "errorInformation": { + "errorCode": "5201", + "errorDescription": "Generic Error in Payee DFSP" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 19, + "priority": 1, + "description": "FxQuotes generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "13", + "path": "conversionTerms.sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "errorInformation": { + "errorCode": "2000", + "errorDescription": "This is a generic error" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 20, + "priority": 1, + "description": "fxTransfers generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "13", + "path": "sourceAmount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "errorInformation": { + "errorCode": "2000", + "errorDescription": "This is a generic error" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 21, + "priority": 1, + "description": "transfers generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericEqual", + "value": "13", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "errorInformation": { + "errorCode": "2000", + "errorDescription": "This is a generic error" + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + } +] \ No newline at end of file diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_validation/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_validation/default.json deleted file mode 100644 index 0637a088..00000000 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_validation/default.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rules/pm4ml/forex/rules_sync_response/default.json b/rules/pm4ml/forex/rules_sync_response/default.json new file mode 100644 index 00000000..f2497a19 --- /dev/null +++ b/rules/pm4ml/forex/rules_sync_response/default.json @@ -0,0 +1,550 @@ +[ + { + "ruleId": 6, + "priority": 1, + "description": "FXP - post /fxQuotes", + "apiVersion": { + "asynchronous": false, + "majorVersion": 2, + "minorVersion": 1, + "type": "mojaloop_connector_outbound" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "params": { + "body": { + "conversionTerms": { + "amountType": "SEND", + "conversionId": "{$request.body.conversionTerms.conversionId}", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "expiration": "{$request.body.conversionTerms.expiration}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}" + } + }, + "homeTransactionId": "homeTransactionId-123" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const fxQuoteBody = JSON.parse(request.body)", + "const fxRates = {", + " \"base\": \"USD\",", + " \"date\": \"2023-03-03\",", + " \"rates\": {", + " \"AED\": 3.670595,", + " \"AFN\": 88.881425,", + " \"ALL\": 108.376523,", + " \"AMD\": 390.471399,", + " \"ANG\": 1.804308,", + " \"AOA\": 505.839998,", + " \"ARS\": 197.689779,", + " \"AUD\": 1.48222,", + " \"AWG\": 1.799566,", + " \"AZN\": 1.699337,", + " \"BAM\": 1.842544,", + " \"BBD\": 1.998973,", + " \"BDT\": 107.07517,", + " \"BGN\": 1.843505,", + " \"BHD\": 0.376919,", + " \"BIF\": 2079.526363,", + " \"BMD\": 0.999953,", + " \"BND\": 1.34899,", + " \"BOB\": 6.915241,", + " \"BRL\": 5.198354,", + " \"BSD\": 0.999335,", + " \"BTC\": 0.000044,", + " \"BTN\": 82.647688,", + " \"BWP\": 13.237335,", + " \"BYN\": 2.526074,", + " \"BZD\": 2.01736,", + " \"CAD\": 1.357836,", + " \"CDF\": 2086.44176,", + " \"CHF\": 0.940605,", + " \"CLF\": 0.02963,", + " \"CLP\": 812.200511,", + " \"CNH\": 6.904663,", + " \"CNY\": 6.898567,", + " \"COP\": 4833.056834,", + " \"CRC\": 558.748547,", + " \"CUC\": 0.99935,", + " \"CUP\": 25.728404,", + " \"CVE\": 103.850722,", + " \"CZK\": 22.089353,", + " \"DJF\": 178.175863,", + " \"DKK\": 7.009313,", + " \"DOP\": 55.539156,", + " \"DZD\": 136.526375,", + " \"EGP\": 30.743014,", + " \"ERN\": 14.987908,", + " \"ETB\": 53.840023,", + " \"EUR\": 0.942228,", + " \"FJD\": 2.210902,", + " \"FKP\": 0.83471,", + " \"GBP\": 0.834759,", + " \"GEL\": 2.598071,", + " \"GGP\": 0.834647,", + " \"GHS\": 12.759418,", + " \"GIP\": 0.834672,", + " \"GMD\": 60.98912,", + " \"GNF\": 8615.060299,", + " \"GTQ\": 7.816555,", + " \"GYD\": 211.148725,", + " \"HKD\": 7.843114,", + " \"HNL\": 24.676398,", + " \"HRK\": 7.096534,", + " \"HTG\": 151.107107,", + " \"HUF\": 354.546511,", + " \"IDR\": 15305.816425,", + " \"ILS\": 3.659591,", + " \"IMP\": 0.83482,", + " \"INR\": 82.271752,", + " \"IQD\": 1460.523392,", + " \"IRR\": 42214.667089,", + " \"ISK\": 142.311052,", + " \"JEP\": 0.83532,", + " \"JMD\": 154.109032,", + " \"JOD\": 0.709871,", + " \"JPY\": 136.579884,", + " \"KES\": 127.794041,", + " \"KGS\": 87.345932,", + " \"KHR\": 4067.915978,", + " \"KMF\": 464.562389,", + " \"KPW\": 899.247674,", + " \"KRW\": 1302.190934,", + " \"KWD\": 0.307326,", + " \"KYD\": 0.83405,", + " \"KZT\": 436.101643,", + " \"LAK\": 16873.790213,", + " \"LBP\": 15020.521133,", + " \"LKR\": 345.92388,", + " \"LRD\": 159.117366,", + " \"LSL\": 18.20456,", + " \"LYD\": 4.835853,", + " \"MAD\": 10.388795,", + " \"MDL\": 18.888917,", + " \"MGA\": 4296.352625,", + " \"MKD\": 58.02969,", + " \"MMK\": 2101.470623,", + " \"MNT\": 3404.116439,", + " \"MOP\": 8.091167,", + " \"MRU\": 36.386096,", + " \"MUR\": 46.641155,", + " \"MVR\": 15.347871,", + " \"MWK\": 1027.828846,", + " \"MXN\": 18.098725,", + " \"MYR\": 4.474645,", + " \"MZN\": 63.797698,", + " \"NAD\": 18.214751,", + " \"NGN\": 460.317636,", + " \"NIO\": 36.600644,", + " \"NOK\": 10.424506,", + " \"NPR\": 132.235448,", + " \"NZD\": 1.604879,", + " \"OMR\": 0.385743,", + " \"PAB\": 0.999902,", + " \"PEN\": 3.770718,", + " \"PGK\": 3.527422,", + " \"PHP\": 54.844041,", + " \"PKR\": 278.695386,", + " \"PLN\": 4.423791,", + " \"PYG\": 7220.315472,", + " \"QAR\": 3.651532,", + " \"RON\": 4.637626,", + " \"RSD\": 110.496314,", + " \"RUB\": 75.238572,", + " \"RWF\": 1091.764956,", + " \"SAR\": 3.750399,", + " \"SBD\": 8.239938,", + " \"SCR\": 13.476738,", + " \"SDG\": 590.506115,", + " \"SEK\": 10.481266,", + " \"SGD\": 1.346505,", + " \"SHP\": 0.834776,", + " \"SLL\": 17650.226858,", + " \"SOS\": 568.863447,", + " \"SRD\": 33.904806,", + " \"SSP\": 130.15096,", + " \"STD\": 22804.902808,", + " \"STN\": 23.075404,", + " \"SVC\": 8.756667,", + " \"SYP\": 2510.429835,", + " \"SZL\": 18.20316,", + " \"THB\": 34.771491,", + " \"TJS\": 10.006042,", + " \"TMT\": 3.507758,", + " \"TND\": 3.129616,", + " \"TOP\": 2.355679,", + " \"TRY\": 18.879408,", + " \"TTD\": 6.789468,", + " \"TWD\": 30.624624,", + " \"TZS\": 2330.0501,", + " \"UAH\": 36.958426,", + " \"UGX\": 3718.628848,", + " \"USD\": 1,", + " \"UYU\": 38.884596,", + " \"UZS\": 11371.806807,", + " \"VES\": 24.306068,", + " \"VND\": 23702.143038,", + " \"VUV\": 117.94585,", + " \"WST\": 2.695482,", + " \"XAF\": 617.756757,", + " \"XAG\": 0.047556,", + " \"XAU\": 0.0011,", + " \"XCD\": 2.700451,", + " \"XDR\": 0.751352,", + " \"XOF\": 617.756728,", + " \"XPD\": 0.001709,", + " \"XPF\": 112.382643,", + " \"XPT\": 0.001221,", + " \"YER\": 250.041827,", + " \"ZAR\": 18.172541,", + " \"ZMW\": 19.989716,", + " \"ZWL\": 321.731101", + " }", + "}", + "", + "const sourceCurrency = fxQuoteBody.conversionTerms.sourceAmount?.currency", + "const targetCurrency = fxQuoteBody.conversionTerms.targetAmount?.currency", + "let conversionRate = 1", + "", + "if(sourceCurrency === fxRates.base) {", + " conversionRate = fxRates.rates[targetCurrency]", + "} else {", + " const invertConvRate1 = fxRates.rates[sourceCurrency]", + " const baseConvRate = fxRates.rates[targetCurrency]", + " conversionRate = (baseConvRate / invertConvRate1)", + "}", + "", + "const sourceAmount = fxQuoteBody.conversionTerms.sourceAmount.amount", + "const targetAmount = fxQuoteBody.conversionTerms.targetAmount.amount", + "", + "let newSourceAmount = sourceAmount", + "let newTargetAmount = targetAmount", + "", + "if (!sourceAmount) {", + " newSourceAmount = Math.round(targetAmount / conversionRate)", + "}", + "", + "if (!targetAmount) {", + " newTargetAmount = Math.round(sourceAmount * conversionRate)", + "}", + "", + "const chargesPercent = 2", + "const chargesSourceAmount = Math.round(newSourceAmount * chargesPercent) / 100", + "const chargesTargetAmount = Math.round(newTargetAmount * chargesPercent) / 100", + "", + "custom.appendEventBody({", + " conversionTerms: {", + " sourceAmount: {", + " amount: newSourceAmount + \"\"", + " },", + " targetAmount: {", + " amount: newTargetAmount + \"\"", + " },", + " charges: [", + " {", + " chargeType: \"currency conversion\",", + " sourceAmount: {", + " amount: chargesSourceAmount + \"\",", + " currency: sourceCurrency", + " },", + " targetAmount: {", + " amount: chargesTargetAmount + \"\",", + " currency: targetCurrency", + " }", + " }", + " ]", + " }", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "path": null, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 7, + "priority": 1, + "description": "FXP - post /fxTransfers response", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeTransactionId": "{$request.body.homeTransactionId}", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 8, + "priority": 1, + "description": "get /parties/{idType}/{idValue}", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "dateOfBirth": "1966-06-16", + "displayName": "Yaro", + "firstName": "Yaro", + "fspId": "testpayee", + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "lastName": "Smith", + "merchantClassificationCode": "1234", + "middleName": "", + "kycInformation": "This is encrypted KYC information", + "supportedCurrencies": [ + "ZMW" + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 9, + "priority": 1, + "description": "post /quoterequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quoterequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 10, + "priority": 1, + "description": "post /transfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "completedTimestamp": "{$environment.completedTimestamp}", + "homeTransactionId": "123", + "transferState": "COMMITTED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 11, + "priority": 1, + "description": "post /transactionrequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionrequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeR2PTransactionId": "cba321", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestState": "RECEIVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const outEndpoint = userConfig.CALLBACK_ENDPOINT", + "const outReqBody = {", + " transactionRequestId: reqBody.transactionRequestId,", + " homeR2PTransactionId: 'abc123',", + " from: reqBody.to,", + " to: reqBody.from,", + " amountType: \"RECEIVE\",", + " currency: reqBody.currency,", + " amount: reqBody.amount,", + " scenario: \"DEPOSIT\",", + " initiator: reqBody.initiator,", + " initiatorType: reqBody.initiatorType,", + " note: \"Note sent to Payee.\"", + "}", + "try {", + " const axioResponse = await axios({", + " method: 'post',", + " url: outEndpoint + '/requestToPayTransfer',", + " data: outReqBody", + " });", + " res = axioResponse.data;", + " responseCode = axioResponse.code || axioResponse.status", + "} catch (err) {", + " console.log(err)", + "}", + "" + ], + "scriptingEngine": "javascript" + } + }, + "type": "MOCK_RESPONSE" + }, + "type": "response", + "version": 1 + } +] \ No newline at end of file diff --git a/rules/pm4ml/fxp_response_rules.json b/rules/pm4ml/forex/rules_sync_response/fxp_response_rules.json similarity index 100% rename from rules/pm4ml/fxp_response_rules.json rename to rules/pm4ml/forex/rules_sync_response/fxp_response_rules.json diff --git a/rules/pm4ml/proxy/rules_sync_response/default.json b/rules/pm4ml/proxy/rules_sync_response/default.json new file mode 100644 index 00000000..f2497a19 --- /dev/null +++ b/rules/pm4ml/proxy/rules_sync_response/default.json @@ -0,0 +1,550 @@ +[ + { + "ruleId": 6, + "priority": 1, + "description": "FXP - post /fxQuotes", + "apiVersion": { + "asynchronous": false, + "majorVersion": 2, + "minorVersion": 1, + "type": "mojaloop_connector_outbound" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "params": { + "body": { + "conversionTerms": { + "amountType": "SEND", + "conversionId": "{$request.body.conversionTerms.conversionId}", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "expiration": "{$request.body.conversionTerms.expiration}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", + "sourceAmount": { + "currency": "{$request.body.conversionTerms.sourceAmount.currency}" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}" + } + }, + "homeTransactionId": "homeTransactionId-123" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const fxQuoteBody = JSON.parse(request.body)", + "const fxRates = {", + " \"base\": \"USD\",", + " \"date\": \"2023-03-03\",", + " \"rates\": {", + " \"AED\": 3.670595,", + " \"AFN\": 88.881425,", + " \"ALL\": 108.376523,", + " \"AMD\": 390.471399,", + " \"ANG\": 1.804308,", + " \"AOA\": 505.839998,", + " \"ARS\": 197.689779,", + " \"AUD\": 1.48222,", + " \"AWG\": 1.799566,", + " \"AZN\": 1.699337,", + " \"BAM\": 1.842544,", + " \"BBD\": 1.998973,", + " \"BDT\": 107.07517,", + " \"BGN\": 1.843505,", + " \"BHD\": 0.376919,", + " \"BIF\": 2079.526363,", + " \"BMD\": 0.999953,", + " \"BND\": 1.34899,", + " \"BOB\": 6.915241,", + " \"BRL\": 5.198354,", + " \"BSD\": 0.999335,", + " \"BTC\": 0.000044,", + " \"BTN\": 82.647688,", + " \"BWP\": 13.237335,", + " \"BYN\": 2.526074,", + " \"BZD\": 2.01736,", + " \"CAD\": 1.357836,", + " \"CDF\": 2086.44176,", + " \"CHF\": 0.940605,", + " \"CLF\": 0.02963,", + " \"CLP\": 812.200511,", + " \"CNH\": 6.904663,", + " \"CNY\": 6.898567,", + " \"COP\": 4833.056834,", + " \"CRC\": 558.748547,", + " \"CUC\": 0.99935,", + " \"CUP\": 25.728404,", + " \"CVE\": 103.850722,", + " \"CZK\": 22.089353,", + " \"DJF\": 178.175863,", + " \"DKK\": 7.009313,", + " \"DOP\": 55.539156,", + " \"DZD\": 136.526375,", + " \"EGP\": 30.743014,", + " \"ERN\": 14.987908,", + " \"ETB\": 53.840023,", + " \"EUR\": 0.942228,", + " \"FJD\": 2.210902,", + " \"FKP\": 0.83471,", + " \"GBP\": 0.834759,", + " \"GEL\": 2.598071,", + " \"GGP\": 0.834647,", + " \"GHS\": 12.759418,", + " \"GIP\": 0.834672,", + " \"GMD\": 60.98912,", + " \"GNF\": 8615.060299,", + " \"GTQ\": 7.816555,", + " \"GYD\": 211.148725,", + " \"HKD\": 7.843114,", + " \"HNL\": 24.676398,", + " \"HRK\": 7.096534,", + " \"HTG\": 151.107107,", + " \"HUF\": 354.546511,", + " \"IDR\": 15305.816425,", + " \"ILS\": 3.659591,", + " \"IMP\": 0.83482,", + " \"INR\": 82.271752,", + " \"IQD\": 1460.523392,", + " \"IRR\": 42214.667089,", + " \"ISK\": 142.311052,", + " \"JEP\": 0.83532,", + " \"JMD\": 154.109032,", + " \"JOD\": 0.709871,", + " \"JPY\": 136.579884,", + " \"KES\": 127.794041,", + " \"KGS\": 87.345932,", + " \"KHR\": 4067.915978,", + " \"KMF\": 464.562389,", + " \"KPW\": 899.247674,", + " \"KRW\": 1302.190934,", + " \"KWD\": 0.307326,", + " \"KYD\": 0.83405,", + " \"KZT\": 436.101643,", + " \"LAK\": 16873.790213,", + " \"LBP\": 15020.521133,", + " \"LKR\": 345.92388,", + " \"LRD\": 159.117366,", + " \"LSL\": 18.20456,", + " \"LYD\": 4.835853,", + " \"MAD\": 10.388795,", + " \"MDL\": 18.888917,", + " \"MGA\": 4296.352625,", + " \"MKD\": 58.02969,", + " \"MMK\": 2101.470623,", + " \"MNT\": 3404.116439,", + " \"MOP\": 8.091167,", + " \"MRU\": 36.386096,", + " \"MUR\": 46.641155,", + " \"MVR\": 15.347871,", + " \"MWK\": 1027.828846,", + " \"MXN\": 18.098725,", + " \"MYR\": 4.474645,", + " \"MZN\": 63.797698,", + " \"NAD\": 18.214751,", + " \"NGN\": 460.317636,", + " \"NIO\": 36.600644,", + " \"NOK\": 10.424506,", + " \"NPR\": 132.235448,", + " \"NZD\": 1.604879,", + " \"OMR\": 0.385743,", + " \"PAB\": 0.999902,", + " \"PEN\": 3.770718,", + " \"PGK\": 3.527422,", + " \"PHP\": 54.844041,", + " \"PKR\": 278.695386,", + " \"PLN\": 4.423791,", + " \"PYG\": 7220.315472,", + " \"QAR\": 3.651532,", + " \"RON\": 4.637626,", + " \"RSD\": 110.496314,", + " \"RUB\": 75.238572,", + " \"RWF\": 1091.764956,", + " \"SAR\": 3.750399,", + " \"SBD\": 8.239938,", + " \"SCR\": 13.476738,", + " \"SDG\": 590.506115,", + " \"SEK\": 10.481266,", + " \"SGD\": 1.346505,", + " \"SHP\": 0.834776,", + " \"SLL\": 17650.226858,", + " \"SOS\": 568.863447,", + " \"SRD\": 33.904806,", + " \"SSP\": 130.15096,", + " \"STD\": 22804.902808,", + " \"STN\": 23.075404,", + " \"SVC\": 8.756667,", + " \"SYP\": 2510.429835,", + " \"SZL\": 18.20316,", + " \"THB\": 34.771491,", + " \"TJS\": 10.006042,", + " \"TMT\": 3.507758,", + " \"TND\": 3.129616,", + " \"TOP\": 2.355679,", + " \"TRY\": 18.879408,", + " \"TTD\": 6.789468,", + " \"TWD\": 30.624624,", + " \"TZS\": 2330.0501,", + " \"UAH\": 36.958426,", + " \"UGX\": 3718.628848,", + " \"USD\": 1,", + " \"UYU\": 38.884596,", + " \"UZS\": 11371.806807,", + " \"VES\": 24.306068,", + " \"VND\": 23702.143038,", + " \"VUV\": 117.94585,", + " \"WST\": 2.695482,", + " \"XAF\": 617.756757,", + " \"XAG\": 0.047556,", + " \"XAU\": 0.0011,", + " \"XCD\": 2.700451,", + " \"XDR\": 0.751352,", + " \"XOF\": 617.756728,", + " \"XPD\": 0.001709,", + " \"XPF\": 112.382643,", + " \"XPT\": 0.001221,", + " \"YER\": 250.041827,", + " \"ZAR\": 18.172541,", + " \"ZMW\": 19.989716,", + " \"ZWL\": 321.731101", + " }", + "}", + "", + "const sourceCurrency = fxQuoteBody.conversionTerms.sourceAmount?.currency", + "const targetCurrency = fxQuoteBody.conversionTerms.targetAmount?.currency", + "let conversionRate = 1", + "", + "if(sourceCurrency === fxRates.base) {", + " conversionRate = fxRates.rates[targetCurrency]", + "} else {", + " const invertConvRate1 = fxRates.rates[sourceCurrency]", + " const baseConvRate = fxRates.rates[targetCurrency]", + " conversionRate = (baseConvRate / invertConvRate1)", + "}", + "", + "const sourceAmount = fxQuoteBody.conversionTerms.sourceAmount.amount", + "const targetAmount = fxQuoteBody.conversionTerms.targetAmount.amount", + "", + "let newSourceAmount = sourceAmount", + "let newTargetAmount = targetAmount", + "", + "if (!sourceAmount) {", + " newSourceAmount = Math.round(targetAmount / conversionRate)", + "}", + "", + "if (!targetAmount) {", + " newTargetAmount = Math.round(sourceAmount * conversionRate)", + "}", + "", + "const chargesPercent = 2", + "const chargesSourceAmount = Math.round(newSourceAmount * chargesPercent) / 100", + "const chargesTargetAmount = Math.round(newTargetAmount * chargesPercent) / 100", + "", + "custom.appendEventBody({", + " conversionTerms: {", + " sourceAmount: {", + " amount: newSourceAmount + \"\"", + " },", + " targetAmount: {", + " amount: newTargetAmount + \"\"", + " },", + " charges: [", + " {", + " chargeType: \"currency conversion\",", + " sourceAmount: {", + " amount: chargesSourceAmount + \"\",", + " currency: sourceCurrency", + " },", + " targetAmount: {", + " amount: chargesTargetAmount + \"\",", + " currency: targetCurrency", + " }", + " }", + " ]", + " }", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "path": null, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 7, + "priority": 1, + "description": "FXP - post /fxTransfers response", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeTransactionId": "{$request.body.homeTransactionId}", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 8, + "priority": 1, + "description": "get /parties/{idType}/{idValue}", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_outbound", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "dateOfBirth": "1966-06-16", + "displayName": "Yaro", + "firstName": "Yaro", + "fspId": "testpayee", + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "lastName": "Smith", + "merchantClassificationCode": "1234", + "middleName": "", + "kycInformation": "This is encrypted KYC information", + "supportedCurrencies": [ + "ZMW" + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 9, + "priority": 1, + "description": "post /quoterequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quoterequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 10, + "priority": 1, + "description": "post /transfers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "completedTimestamp": "{$environment.completedTimestamp}", + "homeTransactionId": "123", + "transferState": "COMMITTED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "environment.completedTimestamp = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 11, + "priority": 1, + "description": "post /transactionrequests", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 2, + "type": "mojaloop_connector_backend", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionrequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "homeR2PTransactionId": "cba321", + "transactionId": "{$function.generic.generateUUID}", + "transactionRequestState": "RECEIVED" + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const outEndpoint = userConfig.CALLBACK_ENDPOINT", + "const outReqBody = {", + " transactionRequestId: reqBody.transactionRequestId,", + " homeR2PTransactionId: 'abc123',", + " from: reqBody.to,", + " to: reqBody.from,", + " amountType: \"RECEIVE\",", + " currency: reqBody.currency,", + " amount: reqBody.amount,", + " scenario: \"DEPOSIT\",", + " initiator: reqBody.initiator,", + " initiatorType: reqBody.initiatorType,", + " note: \"Note sent to Payee.\"", + "}", + "try {", + " const axioResponse = await axios({", + " method: 'post',", + " url: outEndpoint + '/requestToPayTransfer',", + " data: outReqBody", + " });", + " res = axioResponse.data;", + " responseCode = axioResponse.code || axioResponse.status", + "} catch (err) {", + " console.log(err)", + "}", + "" + ], + "scriptingEngine": "javascript" + } + }, + "type": "MOCK_RESPONSE" + }, + "type": "response", + "version": 1 + } +] \ No newline at end of file From 5b10656e3d02a95adec1891dc9a4b42e5a1f344f Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 18 Sep 2024 23:39:48 +0530 Subject: [PATCH 25/39] fix: assertions on versions --- .../api-tests/Quotes/quotes-negative-scenarios.json | 8 ++++---- ...istent FSP-ID in the FSPIOP-Destination header.json | 4 ++-- .../transfers/original_transfer_at_committed.json | 8 ++++---- .../hub/golden_path/feature_tests/get_transfers.json | 2 +- .../patch_notifications/patch_notification.json | 2 +- .../feature_tests/post_scenarios/positive.json | 4 ++-- ...eserve_notification_positive_testfsp1_testfsp2.json | 10 +++++----- .../transfer_negative_scenarios/payee_abort_v1.1.json | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json b/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json index 38739aa2..052c2f2b 100644 --- a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json +++ b/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json @@ -166,7 +166,7 @@ }, { "id": 14, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')", "" @@ -409,7 +409,7 @@ }, { "id": 14, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')", "" @@ -760,7 +760,7 @@ }, { "id": 14, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')", "" @@ -1005,7 +1005,7 @@ }, { "id": 14, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')", "" diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json index 1ab87491..9781b56d 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json @@ -239,7 +239,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version=1.1')" + "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" ] }, { @@ -605,7 +605,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version=1.1')" + "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json index 4c8390aa..5b3566d1 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json @@ -292,7 +292,7 @@ }, { "id": 17, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')", "" @@ -610,7 +610,7 @@ }, { "id": 17, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')", "" @@ -752,9 +752,9 @@ }, { "id": 17, - "description": "Callback Header - content-type is application/vnd.interoperability.quotes+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ - "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.transfers+json;version=1')", + "expect(callback.headers['content-type']).to.have.string('{$inputs.expectedTransfersVersion}')", "" ] }, diff --git a/collections/hub/golden_path/feature_tests/get_transfers.json b/collections/hub/golden_path/feature_tests/get_transfers.json index 020b03da..f59a76a6 100644 --- a/collections/hub/golden_path/feature_tests/get_transfers.json +++ b/collections/hub/golden_path/feature_tests/get_transfers.json @@ -442,7 +442,7 @@ }, { "id": 21, - "description": "Payer FSP: 'content-type' should be 'application/vnd.interoperability.transfers+json;version=1.0'", + "description": "Payer FSP: 'content-type' should be correct", "exec": [ "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}');" ] diff --git a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json index 12eacf47..a5c2a1a5 100644 --- a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json +++ b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json @@ -569,7 +569,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version=1.1')" + "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/positive.json b/collections/hub/golden_path/feature_tests/post_scenarios/positive.json index 74031e9a..1b603318 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/positive.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/positive.json @@ -689,7 +689,7 @@ }, { "id": 59, - "description": "Payee Request: Content-Type is 'application/vnd.interoperability.parties+json;version=1.0'", + "description": "Payee Request: Content-Type is correct", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.payeeRequest.headers['content-type']).to.match(/application\\/vnd\\.interoperability\\.parties\\+json;version=1(\\.\\d)?/)", @@ -941,7 +941,7 @@ }, { "id": 87, - "description": "Payer Callback: 'content-type' header is 'application/vnd.interoperability.transfers+json;version=1.0'", + "description": "Payer Callback: 'content-type' header is correct", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " expect(requestVariables.payerSideTransferCallback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')", diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json index 6aa0710d..a458b59b 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json @@ -808,7 +808,7 @@ }, { "id": 59, - "description": "On testfsp2 content-type should be application/vnd.interoperability.parties+json;version=1.0", + "description": "On testfsp2 content-type should be correct", "exec": [ "", "", @@ -819,7 +819,7 @@ }, { "id": 60, - "description": "On Payee FSP 'accept' header should be 'application/vnd.interoperability.parties+json;version=1.1'", + "description": "On Payee FSP 'accept' header should be correct", "exec": [ "", "", @@ -863,7 +863,7 @@ }, { "id": 64, - "description": "On testfsp2 'content-type' header should be 'application/vnd.interoperability.parties+json;version=1.0'", + "description": "On testfsp2 'content-type' header should be correct", "exec": [ "", "", @@ -1071,11 +1071,11 @@ }, { "id": 81, - "description": "On Payer FSP 'content-type' should be 'application/vnd.interoperability.transfers+json;version=1.1'", + "description": "On Payer FSP 'content-type' should be correct", "exec": [ "/* Disabled temporarily", "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payerSideTransferCallback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version=1.1')", + " expect(requestVariables.payerSideTransferCallback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')", "}*/" ] }, diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index ff37650f..4cf3dbfa 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -450,7 +450,7 @@ }, { "id": 14, - "description": "Callback Header - content-type is application/vnd.interoperability.transfers+json;version=1.0", + "description": "Callback Header - content-type is correct", "exec": [ "expect(callback.headers['content-type']).to.equal('{$inputs.contentTypeTransfers}')", "" From 497b731e04cba79359cb48db36b7470ff9aaa730 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 19 Sep 2024 01:21:59 +0530 Subject: [PATCH 26/39] fix: test case --- .../MojaloopSims_Onboarding/ttkpayeefsp.json | 178 ++++++++---------- 1 file changed, 77 insertions(+), 101 deletions(-) diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json index 6a35cea6..f692cf24 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json @@ -1147,113 +1147,89 @@ }, { "id": 31, - "name": "ttkpayeefsp oracle_registration", "meta": { - "info": "ttkpayeefsp oracle_registration" - }, - "requests": [ - { - "id": 1, - "meta": { - "info": "Add payeeIdentifier in payeeIdType Oracle" - }, - "description": "Add payeeIdentifier in payeeIdType Oracle", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier1}", - "method": "post", - "params": { - "Type": "{$inputs.payeeIdType}", - "ID": "{$inputs.ttkpayeefspIdentifier1}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentTypeParticipants}", - "Accept": "{$inputs.acceptParticipants}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.ttkpayeefspName}" - }, - "body": { - "fspId": "{$inputs.ttkpayeefspName}", - "currency": "{$inputs.currency}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Status code is 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } + "info": "Add payeeIdentifier in payeeIdType Oracle" + }, + "description": "Add payeeIdentifier in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier1}", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier1}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentTypeParticipants}", + "Accept": "{$inputs.acceptParticipants}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.ttkpayeefspName}" + }, + "body": { + "fspId": "{$inputs.ttkpayeefspName}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" ] - }, - "ignoreCallbacks": true - } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" - } + } + ] + }, + "ignoreCallbacks": true }, { - "id": 31, - "name": "ttkpayeefsp oracle_registration", + "id": 32, "meta": { - "info": "ttkpayeefsp oracle_registration" - }, - "requests": [ - { - "id": 1, - "meta": { - "info": "Add payeeIdentifier in payeeIdType Oracle" - }, - "description": "Add payeeIdentifier in payeeIdType Oracle", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/participants/{Type}/{ID}", - "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier2}", - "method": "post", - "params": { - "Type": "{$inputs.payeeIdType}", - "ID": "{$inputs.ttkpayeefspIdentifier2}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "headers": { - "Content-Type": "{$inputs.contentTypeParticipants}", - "Accept": "{$inputs.acceptParticipants}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.ttkpayeefspName}" - }, - "body": { - "fspId": "{$inputs.ttkpayeefspName}", - "currency": "{$inputs.currency}" - }, - "tests": { - "assertions": [ - { - "id": 1, - "description": "Status code is 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - } + "info": "Add payeeIdentifier in payeeIdType Oracle" + }, + "description": "Add payeeIdentifier in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/{$inputs.ttkpayeefspIdentifier2}", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier2}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentTypeParticipants}", + "Accept": "{$inputs.acceptParticipants}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.ttkpayeefspName}" + }, + "body": { + "fspId": "{$inputs.ttkpayeefspName}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" ] - }, - "ignoreCallbacks": true - } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" - } + } + ] + }, + "ignoreCallbacks": true } ], "fileInfo": { From fdaa8236070a88499ad659f1fe18b7382ef844f2 Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Thu, 19 Sep 2024 11:24:07 +0100 Subject: [PATCH 27/39] fix: switch some settlement tests to use WS (#158) fix: switch some settlement tests to WS --- ...ment-management-primary-currency-test.json | 32 ++--- ...ement-management-second-currency-test.json | 122 ++++++++++++------ .../mixed_settlement_model.json | 20 +-- 3 files changed, 106 insertions(+), 68 deletions(-) diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index a3cff400..9c818385 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -2603,19 +2603,19 @@ "console.log(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}');", "", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // if (environment.ENABLE_WS_ASSERTIONS===true) {", - " // await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", - " // }" + " if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", + " }" ] }, "postRequest": { "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", - " const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", - " await custom.sleep(customSleep)", - " environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data", + " environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", + " // const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", + " // await custom.sleep(customSleep)", + " // environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data", "}", "", "console.log(environment.testfsp2callbacks);", @@ -2733,20 +2733,22 @@ "preRequest": { "exec": [ " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // if (environment.ENABLE_WS_ASSERTIONS===true) {", - " // await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", - " // }" + " if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", + " }" ] }, "postRequest": { "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", - " const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", - " await custom.sleep(customSleep)", - " environment.testfsp2callbackst = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.transferId}')).data", - "}" + " environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", + " // const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", + " // await custom.sleep(customSleep)", + " // environment.testfsp2callbackst = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.transferId}')).data", + " console.log(environment.testfsp2callbackst)", + "}", + "" ] } } diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json index 8b7084c2..c397dc0a 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -2601,19 +2601,19 @@ "preRequest": { "exec": [ "// NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - "// if (environment.ENABLE_WS_ASSERTIONS===true) {", - "// await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", - "// }" + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", + "}" ] }, "postRequest": { "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", - " const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 1500", - " await custom.sleep(customSleep)", - " environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data", + " environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", + " // const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 1500", + " // await custom.sleep(customSleep)", + " // environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data", "}", "", "console.log(environment.testfsp2callbacks);", @@ -2934,7 +2934,8 @@ "console.log(environment.transactionid);*/" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3057,7 +3058,8 @@ "console.log(environment.payeefspcallbackst);" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -3242,7 +3244,8 @@ "console.log(environment.transactionid);*/" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3365,7 +3368,8 @@ "console.log(environment.payeefspcallbackst);" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -3436,7 +3440,8 @@ "console.log(environment.openWindowID);" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3519,7 +3524,8 @@ "//}" ] } - } + }, + "disabled": false }, { "id": 3, @@ -3610,7 +3616,8 @@ "*/" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -3679,7 +3686,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3733,7 +3741,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -3787,7 +3796,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -3841,7 +3851,8 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -3957,7 +3968,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -4046,7 +4058,8 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -4129,7 +4142,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -4197,7 +4211,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -4265,7 +4280,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -4333,7 +4349,8 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -4449,7 +4466,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -4538,7 +4556,8 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -4621,7 +4640,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -4689,7 +4709,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -4757,7 +4778,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -4825,7 +4847,8 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -4941,7 +4964,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5030,7 +5054,8 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -5113,7 +5138,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -5181,7 +5207,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -5249,7 +5276,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -5317,7 +5345,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5389,7 +5418,8 @@ "environment.hubMultilateralAccountBalanceAfterCommit = hubMultilateralAccountBalanceAfterCommit;" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -5505,7 +5535,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5594,7 +5625,8 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { @@ -5677,7 +5709,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -5745,7 +5778,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -5813,7 +5847,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -5881,7 +5916,8 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json index 4976383b..cdb132ca 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -3282,7 +3282,7 @@ "", "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", "}" ] }, @@ -3290,10 +3290,10 @@ "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", - " await custom.sleep(customSleep)", - " // environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", - " environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data;", + " environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", + " // const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 2000", + " // await custom.sleep(customSleep)", + " // environment.testfsp2callbacks = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.quoteId}')).data;", " console.log(environment.testfsp2callbacks);", "}", "" @@ -3410,7 +3410,7 @@ "exec": [ "// if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", "// }" ] }, @@ -3418,10 +3418,10 @@ "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", " // NOTE: This has been commented out due to the WS issue https://github.com/mojaloop/project/issues/3164, with a work-around to call the HTTP equivalent API on the postRequest instead until it can be resolved.", - " // environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", - " const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 1500", - " await custom.sleep(customSleep)", - " environment.testfsp2callbackst = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.transferId}')).data", + " environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", + " // const customSleep = Number.parseFloat(environment.SLEEP_MAX_WAIT_IN_MS) || 1500", + " // await custom.sleep(customSleep)", + " // environment.testfsp2callbackst = (await axios.get(environment.TESTFSP2_SDK_TESTAPI_URL + '/callbacks/{$request.body.transferId}')).data", " console.log(environment.testfsp2callbackst)", "}" ] From 3dcb60cb0e666f1531c4b8f4c47435004feea6a8 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 19 Sep 2024 17:28:42 +0530 Subject: [PATCH 28/39] chore: cleanup --- collections/hub/golden_path/fx/feature_tests/master.json | 4 ---- collections/hub/golden_path/master.json | 7 ------- .../settlement_cgs/newsetcgs.json | 0 .../settlement_fx}/settlement_tests.json | 0 4 files changed, 11 deletions(-) rename collections/hub/{golden_path => other_tests}/settlement_cgs/newsetcgs.json (100%) rename collections/hub/{golden_path/fx/feature_tests/settlement => other_tests/settlement_fx}/settlement_tests.json (100%) diff --git a/collections/hub/golden_path/fx/feature_tests/master.json b/collections/hub/golden_path/fx/feature_tests/master.json index 050a2969..8135df63 100644 --- a/collections/hub/golden_path/fx/feature_tests/master.json +++ b/collections/hub/golden_path/fx/feature_tests/master.json @@ -11,10 +11,6 @@ { "name": "negative_scenarios", "type": "folder" - }, - { - "name": "settlement", - "type": "folder" } ] } \ No newline at end of file diff --git a/collections/hub/golden_path/master.json b/collections/hub/golden_path/master.json index 014d3c04..1a91a6a5 100644 --- a/collections/hub/golden_path/master.json +++ b/collections/hub/golden_path/master.json @@ -34,13 +34,6 @@ "name": "api-tests", "type": "folder" }, - { - "name": "settlement_cgs", - "type": "folder", - "labels": [ - "settlements" - ] - }, { "name": "fx", "type": "folder", diff --git a/collections/hub/golden_path/settlement_cgs/newsetcgs.json b/collections/hub/other_tests/settlement_cgs/newsetcgs.json similarity index 100% rename from collections/hub/golden_path/settlement_cgs/newsetcgs.json rename to collections/hub/other_tests/settlement_cgs/newsetcgs.json diff --git a/collections/hub/golden_path/fx/feature_tests/settlement/settlement_tests.json b/collections/hub/other_tests/settlement_fx/settlement_tests.json similarity index 100% rename from collections/hub/golden_path/fx/feature_tests/settlement/settlement_tests.json rename to collections/hub/other_tests/settlement_fx/settlement_tests.json From 83e785edff38743cb9afe032d939693d06b76a96 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 19 Sep 2024 19:08:26 +0530 Subject: [PATCH 29/39] fix: assertions --- ...P-ID in the FSPIOP-Destination header.json | 4 +-- .../patch_notification.json | 2 +- .../post_scenarios/positive.json | 27 ------------------- ...tification_positive_testfsp1_testfsp2.json | 11 -------- rules/hub/rules_callback/default.json | 18 ------------- 5 files changed, 3 insertions(+), 59 deletions(-) diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json index 9781b56d..76841b11 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #2697 - Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect-non-existent FSP-ID in the FSPIOP-Destination header.json @@ -239,7 +239,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { @@ -605,7 +605,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json index a5c2a1a5..ef507f22 100644 --- a/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json +++ b/collections/hub/golden_path/feature_tests/patch_notifications/patch_notification.json @@ -569,7 +569,7 @@ "id": 6, "description": "Payer Callback content-type to be transfers", "exec": [ - "expect(callback.headers['content-type']).to.equal('{$inputs.expectedTransfersVersion}')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/positive.json b/collections/hub/golden_path/feature_tests/post_scenarios/positive.json index 1b603318..66a933c2 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/positive.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/positive.json @@ -687,24 +687,6 @@ "}" ] }, - { - "id": 59, - "description": "Payee Request: Content-Type is correct", - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.match(/application\\/vnd\\.interoperability\\.parties\\+json;version=1(\\.\\d)?/)", - "}" - ] - }, - { - "id": 60, - "description": "Payee Request: Accept matches 'application/vnd.interoperability.parties+json;version=1(\\.\\d)?/' ", - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.match(/application\\/vnd\\.interoperability\\.parties\\+json;version=1(\\.\\d)?/)", - "}" - ] - }, { "id": 61, "description": "Payee Request: Date is not null", @@ -849,15 +831,6 @@ "}" ] }, - { - "id": 77, - "description": "Payee Request: 'accept' header is the same as sent in the request", - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeSideTransferRequest.headers['content-type']).to.match(/application\\/vnd\\.interoperability\\.transfers\\+json;version=1(\\.\\d)?/)", - "}" - ] - }, { "id": 78, "description": "Payee Request: 'fspiop-http-method' i s POST", diff --git a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json index a458b59b..85241184 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json @@ -817,17 +817,6 @@ "}" ] }, - { - "id": 60, - "description": "On Payee FSP 'accept' header should be correct", - "exec": [ - "", - "", - "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.match(/application\\/vnd\\.interoperability\\.parties\\+json;version=1(\\.\\d)?/)", - "}" - ] - }, { "id": 61, "description": "On Payee FSP date cannot be undefined", diff --git a/rules/hub/rules_callback/default.json b/rules/hub/rules_callback/default.json index 0efd43d7..0a79fd49 100644 --- a/rules/hub/rules_callback/default.json +++ b/rules/hub/rules_callback/default.json @@ -993,12 +993,6 @@ "value": "ttkpayeefsp", "path": "FSPIOP-Destination" }, - { - "fact": "headers", - "operator": "equal", - "value": "application/vnd.interoperability.transfers+json;version=1.1", - "path": "Content-Type" - }, { "fact": "body", "operator": "numericEqual", @@ -1060,12 +1054,6 @@ "value": "ttkpayeefsp", "path": "FSPIOP-Destination" }, - { - "fact": "headers", - "operator": "equal", - "value": "application/vnd.interoperability.transfers+json;version=1.1", - "path": "Content-Type" - }, { "fact": "body", "operator": "numericEqual", @@ -1127,12 +1115,6 @@ "value": "ttkpayeefsp", "path": "FSPIOP-Destination" }, - { - "fact": "headers", - "operator": "equal", - "value": "application/vnd.interoperability.transfers+json;version=1.1", - "path": "Content-Type" - }, { "fact": "body", "operator": "numericEqual", From 63ee498a3673243954e750ff9e22a7f39c75e9a7 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 19 Sep 2024 21:44:58 +0530 Subject: [PATCH 30/39] fix: interscheme --- .../as_payee_scheme/happy_path/discovery.json | 2 +- .../for_inter_scheme/new_proxy.json | 1469 +++++++++++++++++ .../hub/proxy/proxy_env_as_payee.json | 12 +- .../hub/proxy/proxy_env_as_payer.json | 14 +- 4 files changed, 1483 insertions(+), 14 deletions(-) create mode 100644 collections/hub/provisioning/for_inter_scheme/new_proxy.json diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json index ba1db8c0..37a2dfda 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json @@ -26,7 +26,7 @@ "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "nonexistentpayerfsp", - "FSPIOP-Proxy": "testingtoolkitdfsp", + "FSPIOP-Proxy": "{$inputs.PROXY1_DFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { diff --git a/collections/hub/provisioning/for_inter_scheme/new_proxy.json b/collections/hub/provisioning/for_inter_scheme/new_proxy.json new file mode 100644 index 00000000..fd9eeb8c --- /dev/null +++ b/collections/hub/provisioning/for_inter_scheme/new_proxy.json @@ -0,0 +1,1469 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Setup Hub accounts", + "meta": { + "info": "Hub account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT Second Currency" + }, + "description": "Add {$inputs.HUB_NAME} Account-HUB_MULTILATERAL_SETTLEMENT Second Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the DFSP currency" + }, + "description": "Add {$inputs.HUB_NAME} Account-HUB_RECONCILIATION for the DFSP currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.currency}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Setup DFSP accounts and limits", + "meta": { + "info": "DFSP account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP" + }, + "description": "Add DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PROXY1_NAME}", + "currency": "{$inputs.currency}", + "isProxy": "true" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add initial position and limits - DFSP" + }, + "description": "Add initial position and limits - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.PROXY1_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "DFSP Get Status Request before deposit" + }, + "description": "DFSP Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - DFSP" + }, + "description": "Deposit Funds in Settlement Account - DFSP", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.PROXY1_NAME}/accounts/{$environment.dfspSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}", + "id": "{$environment.dfspSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "DFSP Get Status Request after deposit" + }, + "description": "DFSP Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.PROXY1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "DFSP Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspSettlementAccountBalanceBeforeFundsIn - +environment.dfspfundsInPrepareAmount)" + ] + } + ] + }, + "delay": "1000", + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " pm.environment.set(\"dfspSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning/new_participants/new_dfsp.json" + } + }, + { + "id": 3, + "name": "Setup Callback Endpoints", + "meta": { + "info": "DFSP callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add DFSP callback - AUTHORIZATIONS" + }, + "description": "Add DFSP callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT" + }, + "description": "Add DFSP callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add DFSP callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add DFSP callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add DFSP callback - PARTIES GET" + }, + "description": "Add DFSP callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add DFSP callback - PARTIES PUT" + }, + "description": "Add DFSP callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add DFSP callback - PARTIES PUT Error" + }, + "description": "Add DFSP callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add DFSP callback - QUOTES" + }, + "description": "Add DFSP callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add DFSP callback - TXN REQUEST" + }, + "description": "Add DFSP callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add DFSP callback - TRANSFERS POST" + }, + "description": "Add DFSP callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add DFSP callback - TRANSFERS PUT" + }, + "description": "Add DFSP callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add DFSP callback - TRANSFERS ERROR" + }, + "description": "Add DFSP callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER POST" + }, + "description": "Add DFSP callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER PUT" + }, + "description": "Add DFSP callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add DFSP callback - BULK-TRANSFER ERROR" + }, + "description": "Add DFSP callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add DFSP callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add DFSP callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID GET" + }, + "description": "Add DFSP callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add DFSP callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add DFSP callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "description": "Add callback - FX TRANSFERS POST", + "meta": { + "info": "Add callback - FX TRANSFERS POST" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "description": "Add callback - FX TRANSFERS PUT", + "meta": { + "info": "Add callback - FX TRANSFERS PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "description": "Add callback - FX TRANSFERS ERROR", + "meta": { + "info": "Add callback - FX TRANSFERS ERROR" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}/fxTransfers/{{commitRequestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "description": "Add callback - FXQUOTES PUT", + "meta": { + "info": "Add callback - FXQUOTES PUT" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.CALLBACK_ENDPOINT_BASE_URL}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/new_participants/new_dfsp.json" + } + }, + { + "id": 4, + "name": "Setup Notification Emails", + "meta": { + "info": "DFSP notification_emails" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY1_NAME}" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PROXY1_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY1_NAME}" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.dfspEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/new_participants/new_dfsp.json" + } + } + ] +} \ No newline at end of file diff --git a/environments/hub/proxy/proxy_env_as_payee.json b/environments/hub/proxy/proxy_env_as_payee.json index 09ae25c9..509d854e 100644 --- a/environments/hub/proxy/proxy_env_as_payee.json +++ b/environments/hub/proxy/proxy_env_as_payee.json @@ -53,13 +53,13 @@ "PROXY1_DFSP_ID": "proxyttk", "currency": "USD", "hub_operator": "NOT_APPLICABLE", - "HOST_CENTRAL_LEDGER": "http://moja1-centralledger-service", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja1-account-lookup-service", - "HOST_ORACLE": "http://moja1-simulator/oracle", - "HOST_QUOTING_SERVICE": "http://moja1-quoting-service", - "HOST_TRANSFERS_SERVICE": "http://moja1-ml-api-adapter-service", + "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", + "HOST_ORACLE": "http://moja-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja-quoting-service", + "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", "dfspEmail": "test@infitx.com", - "CALLBACK_ENDPOINT_BASE_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "CALLBACK_ENDPOINT_BASE_URL": "http://moja-ml-testing-toolkit-backend:4040", "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", "expiration": "2024-07-26T11:12:15.158Z", diff --git a/environments/hub/proxy/proxy_env_as_payer.json b/environments/hub/proxy/proxy_env_as_payer.json index 0c0ca785..9ab3d527 100644 --- a/environments/hub/proxy/proxy_env_as_payer.json +++ b/environments/hub/proxy/proxy_env_as_payer.json @@ -58,15 +58,15 @@ "PROXY1_DFSP_ID": "proxyttk", "currency": "USD", "hub_operator": "NOT_APPLICABLE", - "HOST_CENTRAL_LEDGER": "http://moja1-centralledger-service", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja1-account-lookup-service", - "HOST_ORACLE": "http://moja1-simulator/oracle", - "HOST_QUOTING_SERVICE": "http://moja1-quoting-service", - "HOST_TRANSFERS_SERVICE": "http://moja1-ml-api-adapter-service", - "PROXY1_CALLBACK_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", + "HOST_ORACLE": "http://moja-simulator/oracle", + "HOST_QUOTING_SERVICE": "http://moja-quoting-service", + "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", + "PROXY1_CALLBACK_URL": "http://moja-ml-testing-toolkit-backend:4040", "dfspEmail": "test@infitx.com", "TEST_DFSP_ID": "payeefspproxyttk", - "CALLBACK_ENDPOINT_BASE_URL": "http://moja1-ml-testing-toolkit-backend:4040", + "CALLBACK_ENDPOINT_BASE_URL": "http://moja-ml-testing-toolkit-backend:4040", "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", "expiration": "2024-07-26T11:12:15.158Z", From 7bf98e29f52ec55c255a6bdbbe64bff7e6914837 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 19 Sep 2024 23:39:00 +0530 Subject: [PATCH 31/39] fix: proxy env --- .../as_payee_scheme/happy_path/discovery.json | 10 +-- .../as_payee_scheme/happy_path/quotes.json | 12 +-- .../as_payee_scheme/happy_path/transfers.json | 20 ++--- .../negative_scenarios/discovery.json | 8 +- .../negative_scenarios/quotes.json | 14 +-- .../negative_scenarios/transfers.json | 12 +-- .../as_payer_scheme/happy_path/discovery.json | 14 +-- .../as_payer_scheme/happy_path/quotes.json | 10 +-- .../as_payer_scheme/happy_path/transfers.json | 20 ++--- .../negative_scenarios/discovery.json | 68 +++++++------- .../negative_scenarios/quotes.json | 88 +++++++++---------- .../negative_scenarios/transfers.json | 30 +++---- environments/hub/proxy/onboard_proxy_ttk.json | 19 ---- .../hub/proxy/proxy_env_as_payee.json | 68 -------------- .../hub/proxy/proxy_env_as_payer.json | 76 ---------------- 15 files changed, 153 insertions(+), 316 deletions(-) delete mode 100644 environments/hub/proxy/onboard_proxy_ttk.json delete mode 100644 environments/hub/proxy/proxy_env_as_payee.json delete mode 100644 environments/hub/proxy/proxy_env_as_payer.json diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json index 37a2dfda..12ab7983 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json @@ -19,14 +19,14 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "nonexistentpayerfsp", - "FSPIOP-Proxy": "{$inputs.PROXY1_DFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY1_NAME}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { @@ -42,14 +42,14 @@ "id": 2, "description": "Response Source Header same as Payeefsp Id", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}')" ] }, { "id": 3, "description": "Response Destination Header same as Payerfsp Id", "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}')" ] }, { @@ -70,7 +70,7 @@ "id": 6, "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')" + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}')" ] }, { diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json index 860eacce..a0b464da 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json @@ -26,7 +26,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "nonexistentpayerfsp", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -42,8 +42,8 @@ "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -232,7 +232,7 @@ "id": 4, "description": "Response Destination Header same as Payerfsp Id", "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}')" ] }, { @@ -344,7 +344,7 @@ "id": 4, "description": "Response Destination Header same as Payerfsp Id", "exec": [ - "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect('{$callback.headers['FSPIOP-Destination']}').to.equal('{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}')" ] }, { @@ -352,7 +352,7 @@ "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", "exec": [ "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}')", - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}')", "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_FIRST_NAME}')", "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_LAST_NAME}')" ] diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json index 25b7e631..32c17c3e 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json @@ -24,8 +24,8 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { @@ -36,14 +36,14 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}" } }, "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -177,22 +177,22 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { "transferId": "{$prev.1.request.body.transactionId}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "amount": { "amount": "{$prev.1.callback.body.transferAmount.amount}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json index 9fc039af..a1a91ff1 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json @@ -19,13 +19,13 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" + "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}" }, "headers": { "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "tests": { @@ -41,14 +41,14 @@ "id": 2, "description": "Callback response has errorCode", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')" ] }, { "id": 3, "description": "Callback response has errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" ] } ] diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json index 93ed47e5..01087a2c 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json @@ -21,9 +21,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { @@ -34,7 +34,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -46,8 +46,8 @@ "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -74,8 +74,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" ] } ] diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json index cd4148d4..ce686af7 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json @@ -17,24 +17,24 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { "transferId": "{$function.generic.generateUUID}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "amount": { - "amount": "{$inputs.PAYEE_DFSP_ERROR_AMOUNT_5XXX}", + "amount": "{$inputs.PROXY_PAYEE_DFSP_ERROR_AMOUNT_5XXX}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" }, "expiration": "{$inputs.expiration}", diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json index 20d71d48..620a2225 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -19,13 +19,13 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { @@ -48,14 +48,14 @@ "id": 3, "description": "Response Source Header same as Payeefsp Id", "exec": [ - "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + "expect(callback.headers['fspiop-source']).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}')" ] }, { "id": 4, "description": "Response Destination Header same as Payerfsp Id", "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}')" ] }, { @@ -76,7 +76,7 @@ "id": 7, "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", "exec": [ - "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYEEFSP_PARTY_ID}')" + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}')" ] }, { @@ -110,7 +110,7 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { "Accept": "application/vnd.interoperability.participants+json;version=1.0", @@ -130,7 +130,7 @@ "id": 2, "description": "Oracle has Proxy Payee DFSP set", "exec": [ - "expect(response.body.partyList[0].fspId).to.equal('{$inputs.PROXY_PAYEEFSP_ID}')" + "expect(response.body.partyList[0].fspId).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}')" ] } ] diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json index 9c41f908..fee911e9 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json @@ -24,9 +24,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -36,14 +36,14 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" } }, "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json index b739243e..1af70361 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json @@ -24,8 +24,8 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -35,14 +35,14 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" } }, "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -176,20 +176,20 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "transferId": "{$prev.1.request.body.transactionId}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { "amount": "{$prev.1.callback.body.transferAmount.amount}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json index da99890c..7a4afac7 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json @@ -19,7 +19,7 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}" + "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { "Accept": "application/vnd.interoperability.parties+json;version=1.0", @@ -71,7 +71,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -86,8 +86,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_2XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_DESCRIPTION_2XXX}')" ] } ] @@ -113,7 +113,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -128,8 +128,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_3XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_DESCRIPTION_3XXX}')" ] } ] @@ -155,7 +155,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -170,8 +170,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_4XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_DESCRIPTION_4XXX}')" ] } ] @@ -197,7 +197,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -212,8 +212,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYER_SCHEME_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYER_SCHEME_ERROR_DESCRIPTION_5XXX}')" ] } ] @@ -245,7 +245,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -294,7 +294,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -316,7 +316,7 @@ "id": 3, "description": "Response Destination Header same as Payerfsp Id", "exec": [ - "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYERFSP_ID}')" + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}')" ] }, { @@ -362,7 +362,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -377,14 +377,14 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_2XXX}')" ] }, { "id": 3, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" ] } ] @@ -418,7 +418,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -433,14 +433,14 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_3XXX}')" ] }, { "id": 3, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" ] } ] @@ -474,7 +474,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -489,14 +489,14 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_4XXX}')" ] }, { "id": 3, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" ] } ] @@ -530,7 +530,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -545,14 +545,14 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_5XXX}')" ] }, { "id": 3, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" ] } ] @@ -586,13 +586,13 @@ "method": "get", "params": { "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}" + "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID_ERROR}" }, "headers": { "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}" + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "tests": { "assertions": [ @@ -607,14 +607,14 @@ "id": 2, "description": "Callback response has errorCode", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')" ] }, { "id": 3, "description": "Callback response has errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" ] } ] @@ -645,7 +645,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { @@ -694,7 +694,7 @@ "Accept": "application/vnd.interoperability.parties+json;version=1.0", "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json index 4cddea40..e39fa059 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json @@ -21,9 +21,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "transactionId": "{$function.generic.generateUUID}", @@ -32,7 +32,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -45,8 +45,8 @@ "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -93,9 +93,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -105,7 +105,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -119,7 +119,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -176,9 +176,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -188,14 +188,14 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" } }, "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -271,9 +271,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -283,7 +283,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -296,7 +296,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -323,8 +323,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_2XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX}')" ] } ] @@ -346,9 +346,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -358,7 +358,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -371,7 +371,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -398,8 +398,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_3XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX}')" ] } ] @@ -421,9 +421,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -433,7 +433,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -446,7 +446,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -473,8 +473,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_4XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX}')" ] } ] @@ -496,9 +496,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -508,7 +508,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -521,7 +521,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -548,8 +548,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_SCHEME_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX}')" ] } ] @@ -577,9 +577,9 @@ "Accept": "application/vnd.interoperability.quotes+json;version=1.0", "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -589,7 +589,7 @@ "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", - "fspId": "{$inputs.PROXY_PAYERFSP_ID}" + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, "personalInfo": { "complexName": { @@ -601,8 +601,8 @@ "payee": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", - "partyIdentifier": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP}", - "fspId": "{$inputs.PROXY_PAYEEFSP_ID}" + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID_ERROR}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" } }, "amountType": "RECEIVE", @@ -629,8 +629,8 @@ "id": 2, "description": "Callback response has errorCode and errorDescription", "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PAYEE_DFSP_ERROR_CODE_5XXX}')", - "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" + "expect(callback.body.errorInformation.errorCode).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation.errorDescription).to.equal('{$inputs.PROXY_PAYEE_DFSP_ERROR_DESCRIPTION_5XXX}')" ] } ] diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json index fc2e6281..1a1b9a6f 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json @@ -17,21 +17,21 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "transferId": "{$function.generic.generateUUID}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" @@ -95,21 +95,21 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "transferId": "{$function.generic.generateUUID}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" @@ -173,21 +173,21 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_TRANSFERS_SERVICE}", + "url": "{$inputs.HOST_ML_API_ADAPTER}", "operationPath": "/transfers", "method": "post", "headers": { "Accept": "application/vnd.interoperability.transfers+json;version=1.0", "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_ID}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", - "FSPIOP-Destination": "{$inputs.PROXY_PAYEEFSP_ID}" + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { "transferId": "{$function.generic.generateUUID}", - "payerFsp": "{$inputs.PROXY_PAYERFSP_ID}", - "payeeFsp": "{$inputs.PROXY_PAYEEFSP_ID}", + "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { "amount": "{$inputs.PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY}", "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" diff --git a/environments/hub/proxy/onboard_proxy_ttk.json b/environments/hub/proxy/onboard_proxy_ttk.json deleted file mode 100644 index 3e39b85a..00000000 --- a/environments/hub/proxy/onboard_proxy_ttk.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "inputValues": { - "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", - "HOST_ORACLE": "http://moja-simulator/oracle", - "HOST_QUOTING_SERVICE": "http://moja-quoting-service", - "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", - "dfspEmail": "test@infitx.com", - "DFSP_NAME": "proxyttk", - "currency": "USD", - "DFSP_CALLBACK_URL": "http://moja-ml-testing-toolkit-backend:4040", - "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", - "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", - "expiration": "2024-07-26T11:12:15.158Z", - "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", - "hub_operator": "NOT_APPLICABLE", - "isProxy": true - } -} \ No newline at end of file diff --git a/environments/hub/proxy/proxy_env_as_payee.json b/environments/hub/proxy/proxy_env_as_payee.json deleted file mode 100644 index 509d854e..00000000 --- a/environments/hub/proxy/proxy_env_as_payee.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "inputValues": { - "PROXY_HEADER": "proxyttk", - "PROXY_PAYERFSP_ID": "nonexistentpayerfsp", - "PROXY_PAYERFSP_PARTY_ID_TYPE": "MSISDN", - "PROXY_PAYERFSP_PARTY_ID": "123456", - "PROXY_PAYERFSP_PARTY_FIRST_NAME": "Proxy_Payer_First", - "PROXY_PAYERFSP_PARTY_LAST_NAME": "Proxy_Payer_Last", - "PROXY_PAYERFSP_PARTY_DOB": "10-10-2000", - "PROXY_PAYEEFSP_ID": "ttkpayeefsp", - "PROXY_PAYEEFSP_PARTY_ID_TYPE": "MSISDN", - "PROXY_PAYEEFSP_PARTY_ID": "7891234", - "PROXY_PAYEEFSP_PARTY_FIRST_NAME": "Proxy_Payee_First", - "PROXY_PAYEEFSP_PARTY_LAST_NAME": "Proxy_Payee_Last", - "PROXY_PAYEEFSP_PARTY_DOB": "10-10-2000", - "PROXY_AMOUNT": "100", - "PROXY_AMOUNT_CURRENCY": "XXX", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_2XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_3XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_4XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_5XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE": "3201", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE": "3100", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION": "TBD", - "PAYEE_SCHEME_ERROR_CODE_2XXX": "TBD", - "PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", - "PAYEE_SCHEME_ERROR_CODE_3XXX": "TBD", - "PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", - "PAYEE_SCHEME_ERROR_CODE_4XXX": "TBD", - "PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", - "PAYEE_SCHEME_ERROR_CODE_5XXX": "TBD", - "PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "5201", - "PAYEE_DFSP_ERROR_AMOUNT_5XXX": "5201", - "PAYEE_DFSP_ERROR_CODE_5XXX": "5201", - "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "Generic error in Payee DFSP", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE": "5107", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD", - "PROXY1_DFSP_ID": "proxyttk", - "currency": "USD", - "hub_operator": "NOT_APPLICABLE", - "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", - "HOST_ORACLE": "http://moja-simulator/oracle", - "HOST_QUOTING_SERVICE": "http://moja-quoting-service", - "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", - "dfspEmail": "test@infitx.com", - "CALLBACK_ENDPOINT_BASE_URL": "http://moja-ml-testing-toolkit-backend:4040", - "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", - "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", - "expiration": "2024-07-26T11:12:15.158Z", - "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA" - } -} \ No newline at end of file diff --git a/environments/hub/proxy/proxy_env_as_payer.json b/environments/hub/proxy/proxy_env_as_payer.json deleted file mode 100644 index 9ab3d527..00000000 --- a/environments/hub/proxy/proxy_env_as_payer.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "inputValues": { - "PROXY_HEADER": "proxyttk", - "PROXY_PAYERFSP_ID": "testingtoolkitdfsp", - "PROXY_PAYERFSP_PARTY_ID_TYPE": "MSISDN", - "PROXY_PAYERFSP_PARTY_ID": "123456", - "PROXY_PAYERFSP_PARTY_FIRST_NAME": "Proxy_Payer_First", - "PROXY_PAYERFSP_PARTY_LAST_NAME": "Proxy_Payer_Last", - "PROXY_PAYERFSP_PARTY_DOB": "10-10-2000", - "PROXY_PAYEEFSP_ID": "nonexistentpayeefsp", - "PROXY_PAYEEFSP_PARTY_ID_TYPE": "MSISDN", - "PROXY_PAYEEFSP_PARTY_ID": "123456", - "PROXY_PAYEEFSP_PARTY_FIRST_NAME": "Proxy_Payee_First", - "PROXY_PAYEEFSP_PARTY_LAST_NAME": "Proxy_Payee_Last", - "PROXY_PAYEEFSP_PARTY_DOB": "10-10-2000", - "PROXY_AMOUNT": "100", - "PROXY_AMOUNT_CURRENCY": "XXX", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_2XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_2XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_3XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_3XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_4XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_4XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX": "TBD", - "PAYER_SCHEME_ERROR_CODE_5XXX": "TBD", - "PAYER_SCHEME_ERROR_DESCRIPTION_5XXX": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_CODE": "3201", - "PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY": "3100", - "PROXY_PAYEEFSP_AMOUNT_ERROR_IN_PROXY": "3100", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_CODE": "3100", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY_ERROR_DESCRIPTION": "Generic Error in Proxy", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX": "2001", - "PAYEE_SCHEME_ERROR_CODE_2XXX": "2001", - "PAYEE_SCHEME_ERROR_DESCRIPTION_2XXX": "Generic 200X error in Payeefsp Scheme", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX": "3001", - "PAYEE_SCHEME_ERROR_CODE_3XXX": "3001", - "PAYEE_SCHEME_ERROR_DESCRIPTION_3XXX": "Generic 300X error in Payeefsp Scheme", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX": "4001", - "PAYEE_SCHEME_ERROR_CODE_4XXX": "4001", - "PAYEE_SCHEME_ERROR_DESCRIPTION_4XXX": "Generic 400X error in Payeefsp Scheme", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX": "5001", - "PAYEE_SCHEME_ERROR_CODE_5XXX": "5001", - "PAYEE_SCHEME_ERROR_DESCRIPTION_5XXX": "Generic 500X error in Payeefsp Scheme", - "PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_DFSP": "5101", - "PAYEE_DFSP_ERROR_CODE_5XXX": "5101", - "PAYEE_DFSP_ERROR_DESCRIPTION_5XXX": "Generic error in Payee DFSP", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_CODE": "5107", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_CODE": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR_ERROR_DESCRIPTION": "TBD", - "PROXY_PAYEEFSP_PARTY_ID_SAME_TYPE_AND_ID": "TBD", - "PROXY1_DFSP_ID": "proxyttk", - "currency": "USD", - "hub_operator": "NOT_APPLICABLE", - "HOST_CENTRAL_LEDGER": "http://moja-centralledger-service", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://moja-account-lookup-service", - "HOST_ORACLE": "http://moja-simulator/oracle", - "HOST_QUOTING_SERVICE": "http://moja-quoting-service", - "HOST_TRANSFERS_SERVICE": "http://moja-ml-api-adapter-service", - "PROXY1_CALLBACK_URL": "http://moja-ml-testing-toolkit-backend:4040", - "dfspEmail": "test@infitx.com", - "TEST_DFSP_ID": "payeefspproxyttk", - "CALLBACK_ENDPOINT_BASE_URL": "http://moja-ml-testing-toolkit-backend:4040", - "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", - "fulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", - "expiration": "2024-07-26T11:12:15.158Z", - "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", - "RETRY_MAX_WAIT_IN_MS": 1000 - } -} \ No newline at end of file From 8c5cb32b25ecf59696a78cb021de337490fe2486 Mon Sep 17 00:00:00 2001 From: Vijay Date: Fri, 20 Sep 2024 00:13:08 +0530 Subject: [PATCH 32/39] fix: test --- .../hub/inter_scheme/as_payer_scheme/happy_path/discovery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json index 620a2225..16add377 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -105,7 +105,7 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_ORACLE}", + "url": "{$inputs.HOST_SIMULATOR}", "operationPath": "/participants/{Type}/{ID}", "method": "get", "params": { From 3aa773b0f644825fd6b84d2a93b7df752bfd7517 Mon Sep 17 00:00:00 2001 From: Vijay Date: Fri, 20 Sep 2024 00:20:52 +0530 Subject: [PATCH 33/39] fix: oracle url --- .../hub/inter_scheme/as_payer_scheme/happy_path/discovery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json index 16add377..620a2225 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -105,7 +105,7 @@ "type": "fspiop", "asynchronous": true }, - "url": "{$inputs.HOST_SIMULATOR}", + "url": "{$inputs.HOST_ORACLE}", "operationPath": "/participants/{Type}/{ID}", "method": "get", "params": { From ba8b742536e7a42238d24152e07670bd0d9e8af7 Mon Sep 17 00:00:00 2001 From: Vijay Date: Fri, 20 Sep 2024 13:02:39 +0530 Subject: [PATCH 34/39] fix: test --- .../bug fixes/other-bug-fixes.json | 92 ++----------------- 1 file changed, 10 insertions(+), 82 deletions(-) diff --git a/collections/hub/golden_path/bug fixes/other-bug-fixes.json b/collections/hub/golden_path/bug fixes/other-bug-fixes.json index 0a31f246..2faa38a1 100644 --- a/collections/hub/golden_path/bug fixes/other-bug-fixes.json +++ b/collections/hub/golden_path/bug fixes/other-bug-fixes.json @@ -1,5 +1,6 @@ { - "name": "multi", + "options": {}, + "name": "hub_golden_path_bug fixes_other-bug-fixes", "test_cases": [ { "id": 1, @@ -7,6 +8,9 @@ "meta": { "info": "Check Settlements Error #956" }, + "fileInfo": { + "path": "hub/golden_path/bug fixes/other-bug-fixes.json" + }, "requests": [ { "id": 6, @@ -58,83 +62,6 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" } }, - { - "id": 7, - "meta": { - "info": "Check FSPIOP Headers from Switch #883" - }, - "description": "Check FSPIOP Headers from Switch #883", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "operationPath": "/parties/{Type}/{ID}", - "path": "/parties/MSISDN/{$environment.msisdnid}", - "method": "get", - "params": { - "Type": "MSISDN", - "ID": "{$environment.msisdnid}" - }, - "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", - "ignoreCallbacks": true, - "headers": { - "Accept": "{$inputs.acceptParties}", - "Date": "{$function.generic.curDate}", - "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", - "Authorization": "{$inputs.PAYER_BEARER_TOKEN}", - "Content-Type": "{$inputs.contentTypeParties}" - }, - "scriptingEngine": "javascript", - "tests": { - "assertions": [ - { - "id": 1, - "description": "Response code status 202", - "exec": [ - "expect(response.status).to.equal(202)" - ] - }, - { - "id": 2, - "description": "Expected error code is 3204", - "exec": [ - "expect(environment.payercallbackx.data.errorInformation.errorCode).to.equal('3204');" - ] - }, - { - "id": 3, - "description": "Expected error description - party not Found", - "exec": [ - "expect(environment.payercallbackx.data.errorInformation.errorDescription).to.equal('Party not found');" - ] - } - ] - }, - "scripts": { - "preRequest": { - "exec": [ - "environment.msisdnid = 1999999;", - "", - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " await websocket.connect(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/'+environment.msisdnid, 'payercallback')", - "} ", - " console.log(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/'+environment.msisdnid);" - ] - }, - "postRequest": { - "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "", - " ", - " environment.payercallbackx = await websocket.getMessage('payercallback', environment.WS_ASSERTION_TIMEOUT)", - "}", - "console.log(environment.payercallbackx);" - ] - } - } - }, { "id": 8, "meta": { @@ -200,6 +127,10 @@ } ] }, + "params": { + "Type": "", + "ID": "" + }, "scripts": { "preRequest": { "exec": [ @@ -224,10 +155,7 @@ } } } - ], - "fileInfo": { - "path": "hub/golden_path/bug fixes/other-bug-fixes.json" - } + ] } ] } \ No newline at end of file From f0e894d6daabd33881b508dba000db630624c1f5 Mon Sep 17 00:00:00 2001 From: Vijay Date: Mon, 23 Sep 2024 19:55:45 +0530 Subject: [PATCH 35/39] feat: fx currencies --- .../MojaloopHub_Setup/hub.json | 117 ++++++++++++++++-- .../MojaloopSims_Onboarding/ttkfxp1.json | 10 +- .../MojaloopSims_Onboarding/ttkfxpayee.json | 4 +- .../MojaloopSims_Onboarding/ttkfxpayer.json | 6 +- 4 files changed, 114 insertions(+), 23 deletions(-) diff --git a/collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json b/collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json index 36e2e2b8..3134c2c7 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json @@ -1,5 +1,6 @@ { - "name": "multi", + "options": {}, + "name": "hub_provisioning_for_golden_path_MojaloopHub_Setup", "test_cases": [ { "id": 1, @@ -7,6 +8,9 @@ "meta": { "info": "Hub Account" }, + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json" + }, "requests": [ { "id": 1, @@ -373,16 +377,103 @@ } ] } + }, + { + "id": 10, + "description": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT Third Currency", + "meta": { + "info": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT Second Currency" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.currency3}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 11, + "description": "Add Hub Account-HUB_RECONCILIATION Third Currency", + "meta": { + "info": "Add Hub Account-HUB_RECONCILIATION Second Currency" + }, + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.HUB_NAME}/accounts", + "method": "post", + "params": { + "name": "{$inputs.HUB_NAME}" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.currency3}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopHub_Setup/hub.json" - } + ] }, { "id": 2, "type": "Settlement Models", "name": "Settlement Models", + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json" + }, + "meta": { + "info": "Settlement Models" + }, "requests": [ { "id": 2, @@ -557,15 +648,18 @@ "settlementAccountType": "INTERCHANGE_FEE_SETTLEMENT" } } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopHub_Setup/hub.json" - } + ] }, { "id": 3, "type": "Oracle Onboarding", "name": "Oracle Onboarding", + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json" + }, + "meta": { + "info": "Oracle Onboarding" + }, "requests": [ { "id": 1, @@ -702,10 +796,7 @@ ] } } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopHub_Setup/hub.json" - } + ] } ] } \ No newline at end of file diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json index 19788650..a6a5404a 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json @@ -24,7 +24,7 @@ "method": "post", "body": { "name": "ttkfxp1", - "currency": "{$inputs.currency}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}" }, "headers": { "Content-Type": "application/json" @@ -64,7 +64,7 @@ "name": "ttkfxp1" }, "body": { - "currency": "{$inputs.currency}", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", "limit": { "type": "NET_DEBIT_CAP", "value": 1000000 @@ -116,7 +116,7 @@ "method": "post", "body": { "name": "ttkfxp1", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, "headers": { "Content-Type": "application/json" @@ -156,7 +156,7 @@ "name": "ttkfxp1" }, "body": { - "currency": "{$inputs.currency2}", + "currency": "{$inputs.FX_TARGET_CURRENCY}", "limit": { "type": "NET_DEBIT_CAP", "value": 1000000 @@ -1310,7 +1310,7 @@ "reason": "string", "amount": { "amount": "{$environment.ttkfxp1fundsInPrepareAmountCurrency2}", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, "extensionList": { "extension": [ diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json index fb724616..ed233a49 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json @@ -24,7 +24,7 @@ "method": "post", "body": { "name": "ttkfxpayee", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.FX_TARGET_CURRENCY}" }, "headers": { "Content-Type": "application/json" @@ -64,7 +64,7 @@ "name": "ttkfxpayee" }, "body": { - "currency": "{$inputs.currency2}", + "currency": "{$inputs.FX_TARGET_CURRENCY}", "limit": { "type": "NET_DEBIT_CAP", "value": 1000000 diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json index 5fcdeeec..bb8832fd 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json @@ -24,7 +24,7 @@ "method": "post", "body": { "name": "ttkfxpayer", - "currency": "{$inputs.currency}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}" }, "headers": { "Content-Type": "application/json" @@ -64,7 +64,7 @@ "name": "ttkfxpayer" }, "body": { - "currency": "{$inputs.currency}", + "currency": "{$inputs.FX_SOURCE_CURRENCY}", "limit": { "type": "NET_DEBIT_CAP", "value": 1000000 @@ -1218,7 +1218,7 @@ "reason": "string", "amount": { "amount": "{$environment.ttkfxpayerfundsInPrepareAmount}", - "currency": "{$inputs.currency}" + "currency": "{$inputs.FX_SOURCE_CURRENCY}" }, "extensionList": { "extension": [ From b26831eeb0c9cb79900a2c1cd858258fc11de024 Mon Sep 17 00:00:00 2001 From: Vijay Date: Mon, 23 Sep 2024 20:33:41 +0530 Subject: [PATCH 36/39] fix: onboarding --- .../for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json | 4 ++-- .../for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json index a6a5404a..15ec0a28 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json @@ -1276,7 +1276,7 @@ "const jsonData = pm.response.body", "console.log(jsonData)", "for(var i in jsonData) {", - " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency2')) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('FX_TARGET_CURRENCY')) {", " pm.environment.set(\"ttkfxp1Currency2SettlementAccountId\", jsonData[i].id)", " pm.environment.set(\"ttkfxp1Currency2SettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", " }", @@ -1409,7 +1409,7 @@ " let isOk = false;", " ", " for(var i in jsonData) {", - " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency2') && Number.parseFloat(jsonData[i].value) == expectedBalance) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('FX_TARGET_CURRENCY') && Number.parseFloat(jsonData[i].value) == expectedBalance) {", " pm.environment.set(\"ttkfxp1Currency2SettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", " isOk = true", " }", diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json index bb8832fd..4612b3b9 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json @@ -1184,7 +1184,7 @@ "const jsonData = pm.response.body", "console.log(jsonData)", "for(var i in jsonData) {", - " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency')) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('FX_SOURCE_CURRENCY')) {", " pm.environment.set(\"ttkfxpayerSettlementAccountId\", jsonData[i].id)", " pm.environment.set(\"ttkfxpayerSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", " }", @@ -1317,7 +1317,7 @@ " let isOk = false;", " ", " for(var i in jsonData) {", - " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('currency') && jsonData[i].value == expectedBalance) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT' && jsonData[i].currency === pm.environment.get('FX_SOURCE_CURRENCY') && jsonData[i].value == expectedBalance) {", " pm.environment.set(\"ttkfxpayerSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", " isOk = true", " }", From de2d111d239ba789af3032a7cb0bee246f5b0dd2 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Thu, 26 Sep 2024 08:39:35 +0300 Subject: [PATCH 37/39] feat: add ULID support (#160) --- .../Quotes/quotes-negative-scenarios.json | 56 +++++++++---------- .../Test for 4 decimal points #949.json | 4 +- ...Bugfix #1378 - extension list missing.json | 8 +-- ...st for Bugfix #742 - Error code check.json | 2 +- ...ts for Bugfix #990 and #1016 - Quotes.json | 48 ++++++++-------- ...ervice not using most recent endpoint.json | 8 +-- .../bug fixes/other-bug-fixes.json | 2 +- .../active_and_inactive_participant.json | 8 +-- ...ve_and_inactive_participants_accounts.json | 8 +-- .../fspiop_protocol_validation.json | 16 +++--- .../feature_tests/block_transfer.json | 8 +-- .../transfers/fulfill_commit.json | 8 +-- .../transfers/fulfill_reject.json | 8 +-- .../original_transfer_at_committed.json | 4 +- .../feature_tests/funds_in/funds_in_ttk.json | 2 +- .../Reserve&Abort/funds_out_abort.json | 2 +- .../Reserve&Commit/funds_out_commit.json | 2 +- .../feature_tests/get_transfers.json | 6 +- .../p2p_money_transfer/p2p_happy_path.json | 6 +- .../p2p_happy_path_accent_unicode.json | 4 +- .../p2p_happy_path_burmese_unicode.json | 4 +- .../p2p_happy_path_subid.json | 4 +- .../p2p_happy_path_with_balance_checks.json | 6 +- .../fulfil-reserved-v1.0.json | 4 +- .../payee_abort_v1.1.json | 2 +- .../payee_invalid_fulfillment.json | 4 +- .../payee_invalid_timestamp.json | 4 +- .../payer_transfer_timeout.json | 2 +- .../fx/api_schema_validation/fx_quotes.json | 16 +++--- .../api_schema_validation/fx_transfers.json | 12 ++-- .../duplicate_fx_transfers.json | 8 +-- .../fx/feature_tests/happy_path/fx_tests.json | 8 +-- .../negative_scenarios/fxp_error.json | 14 ++--- .../fxp_invalid_fulfillment.json | 4 +- .../payee_invalid_fulfillment.json | 4 +- .../negative_scenarios/timeout_scenarios.json | 8 +-- .../p2p_money_transfer_on_us.json | 4 +- .../quoting_service/quoting_service.json | 12 ++-- ...ment-management-primary-currency-test.json | 24 ++++---- ...ement-management-second-currency-test.json | 24 ++++---- .../mixed_settlement_model.json | 24 ++++---- .../Error-framework-authorizations.json | 38 ++++++------- .../authorizations.json | 4 +- .../error-framework.json | 10 ++-- .../received State.json | 6 +- .../rejected State.json | 6 +- .../as_payee_scheme/happy_path/quotes.json | 6 +- .../as_payee_scheme/happy_path/transfers.json | 8 +-- .../negative_scenarios/quotes.json | 6 +- .../negative_scenarios/transfers.json | 4 +- .../as_payer_scheme/happy_path/quotes.json | 8 +-- .../as_payer_scheme/happy_path/transfers.json | 8 +-- .../negative_scenarios/quotes.json | 46 +++++++-------- .../negative_scenarios/transfers.json | 12 ++-- .../bulk-duplicated-transfers.json | 24 ++++---- ...ulk-invalid-dfsp-name-header-and-body.json | 48 ++++++++-------- .../bulk_transfers/bulk-warm-up.json | 24 ++++---- .../fspiop_protocol_validation.json | 24 ++++---- .../bulk_transfers/negative_scenarios.json | 8 +-- .../bulk_transfers/positive_scenarios.json | 8 +-- .../other_tests/settlement_cgs/newsetcgs.json | 8 +-- .../settlement_fx/settlement_tests.json | 12 ++-- .../MojaloopSims_Onboarding/testfsp3.json | 4 +- .../MojaloopSims_Onboarding/testfsp4.json | 4 +- .../bulk-happy-path-mvp-out-of-scope.json | 2 +- ...k-quotes-error-cases-mvp-out-of-scope.json | 12 ++-- ...transfers-error-case-mvp-out-of-scope.json | 10 ++-- .../legacy-high-volume-bulk.json | 6 +- .../bulk/basic/bulk-happy-path.json | 4 +- .../bulk/basic/bulk-high-volume_dynamic.json | 2 +- .../bulk/basic/bulk-parties-error-cases.json | 12 ++-- .../bulk/basic/bulk-quotes-error-cases.json | 14 ++--- .../bulk/basic/bulk-sdk-warm-up.json | 4 +- .../basic/bulk-transfers-error-cases.json | 8 +-- 74 files changed, 401 insertions(+), 401 deletions(-) diff --git a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json b/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json index 052c2f2b..3fe3ce0e 100644 --- a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json +++ b/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json @@ -33,8 +33,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -276,8 +276,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -519,8 +519,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -633,8 +633,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -871,8 +871,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1140,8 +1140,8 @@ ] }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1241,8 +1241,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1358,8 +1358,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1475,8 +1475,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1592,8 +1592,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1707,8 +1707,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1822,8 +1822,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1937,8 +1937,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2052,8 +2052,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/bug fixes/Test for 4 decimal points #949.json b/collections/hub/golden_path/bug fixes/Test for 4 decimal points #949.json index d7697fe1..11c4d367 100644 --- a/collections/hub/golden_path/bug fixes/Test for 4 decimal points #949.json +++ b/collections/hub/golden_path/bug fixes/Test for 4 decimal points #949.json @@ -31,8 +31,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json index d845ca42..b9b5aae8 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json @@ -31,8 +31,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -135,8 +135,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json index bcbfdf9d..0e0fbc48 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json @@ -142,7 +142,7 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "transferId": "{$function.generic.generateUUID}+´+1´", + "transferId": "{$function.generic.generateID}+´+1´", "payerFsp": "{$inputs.fromFspId}", "payeeFsp": "{$inputs.payeefsp}", "amount": { diff --git a/collections/hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json b/collections/hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json index a2085fa6..e89c9d4d 100644 --- a/collections/hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json +++ b/collections/hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json @@ -31,8 +31,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -197,7 +197,7 @@ }, "body": { "quoteId": "{$environment.quoteidx}", - "transactionId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -307,7 +307,7 @@ }, "body": { "quoteId": "{$environment.quoteidx}", - "transactionId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -431,8 +431,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -518,8 +518,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -605,8 +605,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -692,8 +692,8 @@ "FSPIOP-Destination": "payeefspNOTFOUND" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -779,8 +779,8 @@ "FSPIOP-Destination": "{$inputs.payeefsp}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -873,8 +873,8 @@ "FSPIOP-Destination": "{$inputs.payeefsp}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -948,10 +948,10 @@ "asynchronous": true }, "operationPath": "/quotes/{ID}", - "path": "/quotes/{$function.generic.generateUUID}", + "path": "/quotes/{$function.generic.generateID}", "method": "put", "params": { - "ID": "{$function.generic.generateUUID}" + "ID": "{$function.generic.generateID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "headers": { @@ -1009,10 +1009,10 @@ "asynchronous": true }, "operationPath": "/quotes/{ID}", - "path": "/quotes/{$function.generic.generateUUID}", + "path": "/quotes/{$function.generic.generateID}", "method": "get", "params": { - "ID": "{$function.generic.generateUUID}" + "ID": "{$function.generic.generateID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "headers": { @@ -1061,10 +1061,10 @@ "asynchronous": true }, "operationPath": "/quotes/{ID}", - "path": "/quotes/{$function.generic.generateUUID}", + "path": "/quotes/{$function.generic.generateID}", "method": "get", "params": { - "ID": "{$function.generic.generateUUID}" + "ID": "{$function.generic.generateID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "headers": { @@ -1136,10 +1136,10 @@ "asynchronous": true }, "operationPath": "/quotes/{ID}", - "path": "/quotes/{$function.generic.generateUUID}", + "path": "/quotes/{$function.generic.generateID}", "method": "get", "params": { - "ID": "{$function.generic.generateUUID}" + "ID": "{$function.generic.generateID}" }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "headers": { diff --git a/collections/hub/golden_path/bug fixes/Tests for Bugfix #998 - Quoting service not using most recent endpoint.json b/collections/hub/golden_path/bug fixes/Tests for Bugfix #998 - Quoting service not using most recent endpoint.json index 34c3140e..8d0e08bf 100644 --- a/collections/hub/golden_path/bug fixes/Tests for Bugfix #998 - Quoting service not using most recent endpoint.json +++ b/collections/hub/golden_path/bug fixes/Tests for Bugfix #998 - Quoting service not using most recent endpoint.json @@ -88,8 +88,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -249,8 +249,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/bug fixes/other-bug-fixes.json b/collections/hub/golden_path/bug fixes/other-bug-fixes.json index 2faa38a1..40edcd02 100644 --- a/collections/hub/golden_path/bug fixes/other-bug-fixes.json +++ b/collections/hub/golden_path/bug fixes/other-bug-fixes.json @@ -90,7 +90,7 @@ "FSPIOP-HTTP-Method": "POST" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.SIMPAYER_NAME}", "payeeFsp": "payeefspNOTFOUND", "amount": { diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json index 90fabbe7..b6683eaf 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json @@ -70,8 +70,8 @@ "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "MSISDN", @@ -489,8 +489,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "MSISDN", diff --git a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json index c4443b19..f6870a0c 100644 --- a/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json +++ b/collections/hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json @@ -107,8 +107,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "MSISDN", @@ -524,8 +524,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "MSISDN", diff --git a/collections/hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json b/collections/hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json index b6176f8a..f67e93ca 100644 --- a/collections/hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json +++ b/collections/hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json @@ -477,8 +477,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -681,8 +681,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -807,8 +807,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1069,8 +1069,8 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/block_transfer.json b/collections/hub/golden_path/feature_tests/block_transfer.json index e6ebb873..56fca652 100644 --- a/collections/hub/golden_path/feature_tests/block_transfer.json +++ b/collections/hub/golden_path/feature_tests/block_transfer.json @@ -328,8 +328,8 @@ "scripts": { "preRequest": { "exec": [ - "requestVariables.quoteId = '{$function.generic.generateUUID}'", - "requestVariables.transactionId = '{$function.generic.generateUUID}'", + "requestVariables.quoteId = '{$function.generic.generateID}'", + "requestVariables.transactionId = '{$function.generic.generateID}'", "", "console.log(`environment.payerNetDebitCapLimit=${environment.payerNetDebitCapLimit}`)", "", @@ -1132,8 +1132,8 @@ "scripts": { "preRequest": { "exec": [ - "requestVariables.quoteId = '{$function.generic.generateUUID}'", - "requestVariables.transactionId = '{$function.generic.generateUUID}'", + "requestVariables.quoteId = '{$function.generic.generateID}'", + "requestVariables.transactionId = '{$function.generic.generateID}'", "", "console.log(`environment.payerNetDebitCapLimit=${environment.payerNetDebitCapLimit}`)", "", diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json index cd35c32b..ccd26e0d 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json @@ -34,8 +34,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -551,8 +551,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json index 0b2e1ea3..9b6966e5 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json @@ -34,8 +34,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -546,8 +546,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json index 5b3566d1..1693a78e 100644 --- a/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json +++ b/collections/hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json @@ -95,8 +95,8 @@ "FSPIOP-Destination": "{$inputs.SIMPAYEE_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json index 7f99bf2b..4a4aaa46 100644 --- a/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json +++ b/collections/hub/golden_path/feature_tests/funds_in/funds_in_ttk.json @@ -138,7 +138,7 @@ }, "scriptingEngine": "javascript", "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json index f65762b0..9ccad3af 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json @@ -138,7 +138,7 @@ }, "scriptingEngine": "javascript", "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsOutPrepareReserve", "reason": "string", diff --git a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json index ae54c282..3baef085 100644 --- a/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json +++ b/collections/hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json @@ -138,7 +138,7 @@ }, "scriptingEngine": "javascript", "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsOutPrepareReserve", "reason": "string", diff --git a/collections/hub/golden_path/feature_tests/get_transfers.json b/collections/hub/golden_path/feature_tests/get_transfers.json index f59a76a6..81c1f8b6 100644 --- a/collections/hub/golden_path/feature_tests/get_transfers.json +++ b/collections/hub/golden_path/feature_tests/get_transfers.json @@ -211,9 +211,9 @@ "scripts": { "preRequest": { "exec": [ - "requestVariables.quoteId = \"{$function.generic.generateUUID}\"", + "requestVariables.quoteId = \"{$function.generic.generateID}\"", "", - "requestVariables.transactionId = \"{$function.generic.generateUUID}\"", + "requestVariables.transactionId = \"{$function.generic.generateID}\"", "", "if(environment.ENABLE_JWS_SIGNING) {", " custom.jws.signRequest(environment.TTKFSP_JWS_KEY)", @@ -989,7 +989,7 @@ "scripts": { "preRequest": { "exec": [ - "requestVariables.transferId = '{$function.generic.generateUUID}'" + "requestVariables.transferId = '{$function.generic.generateID}'" ] }, "postRequest": { diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json index c876a076..f590bc7c 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json @@ -242,9 +242,9 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_accent_unicode.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_accent_unicode.json index 5d139961..6a11c36a 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_accent_unicode.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_accent_unicode.json @@ -236,8 +236,8 @@ "FSPIOP-Destination": "{$inputs.toAccentIdFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_burmese_unicode.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_burmese_unicode.json index b94e016e..9c9b9d79 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_burmese_unicode.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_burmese_unicode.json @@ -236,8 +236,8 @@ "FSPIOP-Destination": "{$inputs.toBurmeseIdFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid.json index 43aa944a..706e455c 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid.json @@ -247,8 +247,8 @@ "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks.json index 0cfe11e2..8ef5403a 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks.json @@ -345,9 +345,9 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json index 0d326062..10e98a6e 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json @@ -37,8 +37,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json index 4cf3dbfa..85338fbf 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json @@ -121,7 +121,7 @@ "FSPIOP-Destination": "{$inputs.NORESPONSE_SIMPAYEE_NAME}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.fromFspId}", "payeeFsp": "{$inputs.NORESPONSE_SIMPAYEE_NAME}", "amount": { diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json index b0eb7d0d..e95e947c 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json @@ -118,8 +118,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json index 768cd5af..1749aed2 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json @@ -118,8 +118,8 @@ }, "url": "{$inputs.HOST_QUOTING_SERVICE}", "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json index a2754ea0..187f1ca0 100644 --- a/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json +++ b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json @@ -123,7 +123,7 @@ "FSPIOP-Destination": "{$inputs.NORESPONSE_SIMPAYEE_NAME}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.fromFspId}", "payeeFsp": "{$inputs.NORESPONSE_SIMPAYEE_NAME}", "amount": { diff --git a/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json b/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json index 4ee8cf6d..e4c5ae25 100644 --- a/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json @@ -33,10 +33,10 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "INVALID", @@ -91,8 +91,8 @@ "body": { "conversionRequestId": "invalid", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -145,10 +145,10 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json b/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json index ed5ceb17..919ad8e7 100644 --- a/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json @@ -41,7 +41,7 @@ "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", "determiningTransferId": "invalid", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", @@ -105,7 +105,7 @@ }, "body": { "commitRequestId": "invalid", - "determiningTransferId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -167,8 +167,8 @@ "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -230,8 +230,8 @@ "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json b/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json index 6c3a0465..40bfa7b4 100644 --- a/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json +++ b/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json @@ -34,10 +34,10 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -167,7 +167,7 @@ "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", "transactionId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", "payer": { "partyIdInfo": { diff --git a/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json index 00b4a0f1..7f008675 100644 --- a/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json +++ b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json @@ -150,10 +150,10 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -279,7 +279,7 @@ "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", "transactionId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", "payer": { "partyIdInfo": { diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json index e8df315c..9618257c 100644 --- a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json @@ -33,10 +33,10 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -190,8 +190,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -485,8 +485,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json index 074a5e93..93af5264 100644 --- a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json @@ -172,8 +172,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json index c8a5f726..6f48fbdf 100644 --- a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json @@ -172,8 +172,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json index 75e38190..4758c98a 100644 --- a/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json @@ -81,8 +81,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -357,8 +357,8 @@ "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" }, "body": { - "commitRequestId": "{$function.generic.generateUUID}", - "determiningTransferId": "{$function.generic.generateUUID}", + "commitRequestId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json b/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json index 48c49539..77096cb2 100644 --- a/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json +++ b/collections/hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json @@ -105,8 +105,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/quoting_service/quoting_service.json b/collections/hub/golden_path/quoting_service/quoting_service.json index d21fa90f..4a61ce2d 100644 --- a/collections/hub/golden_path/quoting_service/quoting_service.json +++ b/collections/hub/golden_path/quoting_service/quoting_service.json @@ -31,8 +31,8 @@ "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -334,8 +334,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -445,8 +445,8 @@ "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index 9c818385..0d607a8b 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -1544,8 +1544,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1856,8 +1856,8 @@ "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2164,8 +2164,8 @@ "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2472,8 +2472,8 @@ "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2791,8 +2791,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -3099,8 +3099,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json index c397dc0a..2bf0dec6 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -1544,8 +1544,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -1856,8 +1856,8 @@ "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2164,8 +2164,8 @@ "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2472,8 +2472,8 @@ "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2789,8 +2789,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -3099,8 +3099,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json index cdb132ca..deaa2729 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -2222,8 +2222,8 @@ "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2534,8 +2534,8 @@ "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -2842,8 +2842,8 @@ "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -3150,8 +3150,8 @@ "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -3467,8 +3467,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -3775,8 +3775,8 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", diff --git a/collections/hub/golden_path/transaction_request_service/Error-framework-authorizations.json b/collections/hub/golden_path/transaction_request_service/Error-framework-authorizations.json index 5695eece..5ef4b460 100644 --- a/collections/hub/golden_path/transaction_request_service/Error-framework-authorizations.json +++ b/collections/hub/golden_path/transaction_request_service/Error-framework-authorizations.json @@ -72,7 +72,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -142,7 +142,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -212,7 +212,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -283,7 +283,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -354,7 +354,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -425,7 +425,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -495,7 +495,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -565,7 +565,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -645,7 +645,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -715,7 +715,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -786,7 +786,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -844,7 +844,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -915,7 +915,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -986,7 +986,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -1057,7 +1057,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -1130,7 +1130,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "" ] } @@ -1201,7 +1201,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -1281,7 +1281,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -1354,7 +1354,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } diff --git a/collections/hub/golden_path/transaction_request_service/authorizations.json b/collections/hub/golden_path/transaction_request_service/authorizations.json index f0e029a6..37e8db0a 100644 --- a/collections/hub/golden_path/transaction_request_service/authorizations.json +++ b/collections/hub/golden_path/transaction_request_service/authorizations.json @@ -59,7 +59,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } @@ -116,7 +116,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)" ] } diff --git a/collections/hub/golden_path/transaction_request_service/error-framework.json b/collections/hub/golden_path/transaction_request_service/error-framework.json index 3c442acc..95aae3d1 100644 --- a/collections/hub/golden_path/transaction_request_service/error-framework.json +++ b/collections/hub/golden_path/transaction_request_service/error-framework.json @@ -53,7 +53,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "/*", "if (environment.ENABLE_WS_ASSERTIONS===true) {", " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payeecallback')", @@ -178,7 +178,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)", "", "environment.transferExpirationx= new Date(new Date().getTime() + 600000);", @@ -308,7 +308,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)", "", "environment.transferExpirationx= new Date(new Date().getTime() + 600000);", @@ -431,7 +431,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)", "", "environment.transferExpirationx= new Date(new Date().getTime() + 600000);", @@ -566,7 +566,7 @@ "scripts": { "preRequest": { "exec": [ - "environment.tranid = '{$function.generic.generateUUID}'", + "environment.tranid = '{$function.generic.generateID}'", "console.log(environment.tranid)", "", "//environment.transferExpirationx= new Date(new Date().getTime() + 600000);", diff --git a/collections/hub/golden_path/transaction_request_service/received State.json b/collections/hub/golden_path/transaction_request_service/received State.json index 29df6fbb..b19b628d 100644 --- a/collections/hub/golden_path/transaction_request_service/received State.json +++ b/collections/hub/golden_path/transaction_request_service/received State.json @@ -34,7 +34,7 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "transactionRequestId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateID}", "payee": { "partyIdInfo": { "partyIdType": "PERSONAL_ID", @@ -69,7 +69,7 @@ "initiator": "PAYEE", "initiatorType": "CONSUMER", "refundInfo": { - "originalTransactionId": "{$function.generic.generateUUID}", + "originalTransactionId": "{$function.generic.generateID}", "refundReason": "free text indicating reason for the refund" }, "balanceOfPayments": "123" @@ -105,7 +105,7 @@ "scripts": { "preRequest": { "exec": [ - "//environment.tranid = '{$function.generic.generateUUID}'", + "//environment.tranid = '{$function.generic.generateID}'", "//console.log(environment.tranid)", "", "environment.transferExpirationx= new Date(new Date().getTime() + 600000).toISOString();", diff --git a/collections/hub/golden_path/transaction_request_service/rejected State.json b/collections/hub/golden_path/transaction_request_service/rejected State.json index ff50a45d..7aef0f2d 100644 --- a/collections/hub/golden_path/transaction_request_service/rejected State.json +++ b/collections/hub/golden_path/transaction_request_service/rejected State.json @@ -34,7 +34,7 @@ "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { - "transactionRequestId": "{$function.generic.generateUUID}", + "transactionRequestId": "{$function.generic.generateID}", "payee": { "partyIdInfo": { "partyIdType": "PERSONAL_ID", @@ -69,7 +69,7 @@ "initiator": "PAYEE", "initiatorType": "CONSUMER", "refundInfo": { - "originalTransactionId": "{$function.generic.generateUUID}", + "originalTransactionId": "{$function.generic.generateID}", "refundReason": "free text indicating reason for the refund" }, "balanceOfPayments": "123" @@ -105,7 +105,7 @@ "scripts": { "preRequest": { "exec": [ - "//environment.tranid = '{$function.generic.generateUUID}'", + "//environment.tranid = '{$function.generic.generateID}'", "//console.log(environment.tranid)", "", "environment.transferExpirationx= new Date(new Date().getTime() + 600000).toISOString();", diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json index a0b464da..b9c9c99e 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json @@ -29,9 +29,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json index 32c17c3e..6876e04e 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json @@ -29,9 +29,9 @@ "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -147,7 +147,7 @@ ] }, "path": "/quotes", - + "scripts": { "preRequest": { "exec": [ diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json index 01087a2c..f97af521 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json @@ -27,9 +27,9 @@ "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json index ce686af7..a66bf7e6 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json @@ -30,7 +30,7 @@ "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "payeeFsp": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", "amount": { @@ -54,7 +54,7 @@ ] }, "path": "/quotes", - + "scripts": { "preRequest": { "exec": [ diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json index fee911e9..fddaf786 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json @@ -29,9 +29,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -147,7 +147,7 @@ ] }, "path": "/quotes", - + "scripts": { "preRequest": { "exec": [ diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json index 1af70361..b7b48e45 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json @@ -28,9 +28,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -146,7 +146,7 @@ ] }, "path": "/quotes", - + "scripts": { "preRequest": { "exec": [ diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json index e39fa059..a7691604 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json @@ -26,8 +26,8 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -98,9 +98,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -181,9 +181,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -276,9 +276,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -351,9 +351,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -426,9 +426,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -501,9 +501,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", @@ -582,9 +582,9 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json index 1a1b9a6f..a9d98235 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json @@ -29,7 +29,7 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { @@ -53,7 +53,7 @@ ] }, "path": "/transfers", - + "scripts": { "preRequest": { "exec": [ @@ -107,7 +107,7 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { @@ -131,7 +131,7 @@ ] }, "path": "/transfers", - + "scripts": { "preRequest": { "exec": [ @@ -185,7 +185,7 @@ "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "payeeFsp": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}", "amount": { @@ -209,7 +209,7 @@ ] }, "path": "/transfers", - + "scripts": { "preRequest": { "exec": [ diff --git a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json index 27b363d2..414bced0 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json @@ -35,12 +35,12 @@ }, "body": { "bulkTransferId": "{$environment.transid}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -61,7 +61,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -372,7 +372,7 @@ "preRequest": { "exec": [ "const delay = 1000 * 3600 * 24", - "environment.transid =\"{$function.generic.generateUUID}\"", + "environment.transid =\"{$function.generic.generateID}\"", "const now = new Date()", "const expirationDate = new Date(now.getTime() + delay).toISOString();", "const completedTimestamp = now.toISOString();", @@ -525,7 +525,7 @@ "preRequest": { "exec": [ "const delay = 1000 * 3600 * 24", - "//environment.transid =\"{$function.generic.generateUUID}\"", + "//environment.transid =\"{$function.generic.generateID}\"", "const now = new Date()", "const expirationDate = new Date(now.getTime() + delay).toISOString();", "const completedTimestamp = now.toISOString();", @@ -579,12 +579,12 @@ }, "body": { "bulkTransferId": "{$environment.transid}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -605,7 +605,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -916,7 +916,7 @@ "preRequest": { "exec": [ "const delay = 1000 * 3600 * 24", - "environment.transid =\"{$function.generic.generateUUID}\"", + "environment.transid =\"{$function.generic.generateID}\"", "const now = new Date()", "const expirationDate = new Date(now.getTime() + delay).toISOString();", "const completedTimestamp = now.toISOString();", @@ -976,7 +976,7 @@ "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -997,7 +997,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -1065,7 +1065,7 @@ "preRequest": { "exec": [ "const delay = 1000 * 3600 * 24", - "//environment.transid =\"{$function.generic.generateUUID}\"", + "//environment.transid =\"{$function.generic.generateID}\"", "const now = new Date()", "const expirationDate = new Date(now.getTime() + delay).toISOString();", "const completedTimestamp = now.toISOString();", diff --git a/collections/hub/other_tests/bulk_transfers/bulk-invalid-dfsp-name-header-and-body.json b/collections/hub/other_tests/bulk_transfers/bulk-invalid-dfsp-name-header-and-body.json index d1b25da5..eaedebca 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-invalid-dfsp-name-header-and-body.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-invalid-dfsp-name-header-and-body.json @@ -34,13 +34,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "DUMMY", "payerFsp": "{$environment.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -61,7 +61,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" @@ -152,13 +152,13 @@ "FSPIOP-Destination": "DUMMY" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$environment.toFspId}", "payerFsp": "{$environment.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -179,7 +179,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" @@ -271,13 +271,13 @@ "FSPIOP-Destination": "DUMMY" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "DUMMY", "payerFsp": "{$environment.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -298,7 +298,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" @@ -402,13 +402,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "DUMMY", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -429,7 +429,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" @@ -569,13 +569,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -596,7 +596,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" @@ -773,13 +773,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -800,7 +800,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "GBP", "amount": "2" diff --git a/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json b/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json index 923772e3..d60b022f 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-warm-up.json @@ -34,13 +34,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -61,7 +61,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -244,13 +244,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -271,7 +271,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -454,13 +454,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -481,7 +481,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" diff --git a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json index 6d8ecb8c..3c929a3f 100644 --- a/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json +++ b/collections/hub/other_tests/bulk_transfers/fspiop_protocol_validation.json @@ -34,13 +34,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -61,7 +61,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -423,13 +423,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -450,7 +450,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" @@ -565,13 +565,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -592,7 +592,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" diff --git a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json index c2ee11f8..955725a8 100644 --- a/collections/hub/other_tests/bulk_transfers/negative_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/negative_scenarios.json @@ -500,13 +500,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$environment.toFspId}", "payerFsp": "{$environment.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -527,7 +527,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "AED", "amount": "2" diff --git a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json index ecbf1581..e870de5f 100644 --- a/collections/hub/other_tests/bulk_transfers/positive_scenarios.json +++ b/collections/hub/other_tests/bulk_transfers/positive_scenarios.json @@ -34,13 +34,13 @@ "FSPIOP-Destination": "{$inputs.toFspId}" }, "body": { - "bulkTransferId": "{$function.generic.generateUUID}", - "bulkQuoteId": "{$function.generic.generateUUID}", + "bulkTransferId": "{$function.generic.generateID}", + "bulkQuoteId": "{$function.generic.generateID}", "payeeFsp": "{$inputs.toFspId}", "payerFsp": "{$inputs.fromFspId}", "individualTransfers": [ { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency}", "amount": "1" @@ -61,7 +61,7 @@ } }, { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "transferAmount": { "currency": "{$inputs.currency2}", "amount": "1" diff --git a/collections/hub/other_tests/settlement_cgs/newsetcgs.json b/collections/hub/other_tests/settlement_cgs/newsetcgs.json index 027ed061..af88eef0 100644 --- a/collections/hub/other_tests/settlement_cgs/newsetcgs.json +++ b/collections/hub/other_tests/settlement_cgs/newsetcgs.json @@ -1001,7 +1001,7 @@ "id": "{$environment.testfsp1SettlementAccountId}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", @@ -1057,7 +1057,7 @@ "id": "{$environment.testfsp2SettlementAccountId}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", @@ -1113,7 +1113,7 @@ "id": "{$environment.testfsp3SettlementAccountId}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", @@ -1169,7 +1169,7 @@ "id": "{$environment.testfsp4SettlementAccountId}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", diff --git a/collections/hub/other_tests/settlement_fx/settlement_tests.json b/collections/hub/other_tests/settlement_fx/settlement_tests.json index e0afbd71..e3cb436c 100644 --- a/collections/hub/other_tests/settlement_fx/settlement_tests.json +++ b/collections/hub/other_tests/settlement_fx/settlement_tests.json @@ -209,9 +209,9 @@ "path": "/fxQuotes", "method": "post", "body": { - "conversionRequestId": "{$function.generic.generateUUID}", + "conversionRequestId": "{$function.generic.generateID}", "conversionTerms": { - "conversionId": "{$function.generic.generateUUID}", + "conversionId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", @@ -329,9 +329,9 @@ "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" }, "body": { - "quoteId": "{$function.generic.generateUUID}", - "transactionId": "{$function.generic.generateUUID}", - "transactionRequestId": "{$function.generic.generateUUID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -517,7 +517,7 @@ }, "body": { "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", - "determiningTransferId": "{$function.generic.generateUUID}", + "determiningTransferId": "{$function.generic.generateID}", "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", "amountType": "SEND", diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json index 7bc42f9c..22618297 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json @@ -161,7 +161,7 @@ "Content-Type": "application/json" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", @@ -193,7 +193,7 @@ "scripts": { "preRequest": { "exec": [ - "//fundsInPrepareTransferId='{$function.generic.generateUUID}'", + "//fundsInPrepareTransferId='{$function.generic.generateID}'", "environment.fundsInPrepareAmount= 5000", "", "", diff --git a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json index 044232ba..ee5e21d8 100644 --- a/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json @@ -161,7 +161,7 @@ "Content-Type": "application/json" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "externalReference": "string", "action": "recordFundsIn", "reason": "string", @@ -193,7 +193,7 @@ "scripts": { "preRequest": { "exec": [ - "//fundsInPrepareTransferId='{$function.generic.generateUUID}'", + "//fundsInPrepareTransferId='{$function.generic.generateID}'", "environment.fundsInPrepareAmount= 5000", "", "", diff --git a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-happy-path-mvp-out-of-scope.json b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-happy-path-mvp-out-of-scope.json index 10379f08..7f2d20f9 100644 --- a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-happy-path-mvp-out-of-scope.json +++ b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-happy-path-mvp-out-of-scope.json @@ -29,7 +29,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-quotes-error-cases-mvp-out-of-scope.json b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-quotes-error-cases-mvp-out-of-scope.json index 2dac94a8..278859fd 100644 --- a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-quotes-error-cases-mvp-out-of-scope.json +++ b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-quotes-error-cases-mvp-out-of-scope.json @@ -29,7 +29,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -223,7 +223,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -407,7 +407,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -626,7 +626,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -845,7 +845,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -1072,7 +1072,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-transfers-error-case-mvp-out-of-scope.json b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-transfers-error-case-mvp-out-of-scope.json index a0398eb5..0c980164 100644 --- a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-transfers-error-case-mvp-out-of-scope.json +++ b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/bulk-transfers-error-case-mvp-out-of-scope.json @@ -29,7 +29,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -361,7 +361,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -653,7 +653,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -951,7 +951,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -1311,7 +1311,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/legacy-high-volume-bulk.json b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/legacy-high-volume-bulk.json index ebeab0c3..0b34243f 100644 --- a/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/legacy-high-volume-bulk.json +++ b/collections/hub/sdk_scheme_adapter/bulk-mvp-out-of-scope/legacy-high-volume-bulk.json @@ -28,7 +28,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -1191,7 +1191,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -2649,7 +2649,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "e0ac0773-2f96-4496-84f7-3c5a8bb2fe63", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-happy-path.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-happy-path.json index 1f93f7fa..6659e175 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-happy-path.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-happy-path.json @@ -32,7 +32,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -623,7 +623,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-high-volume_dynamic.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-high-volume_dynamic.json index 46c3e048..67bf1117 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-high-volume_dynamic.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-high-volume_dynamic.json @@ -26,7 +26,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-parties-error-cases.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-parties-error-cases.json index 6e5eafa1..ae190bbb 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-parties-error-cases.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-parties-error-cases.json @@ -32,7 +32,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -134,7 +134,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -250,7 +250,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -346,7 +346,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -509,7 +509,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -673,7 +673,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-quotes-error-cases.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-quotes-error-cases.json index 72c5ec97..85f0ebd7 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-quotes-error-cases.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-quotes-error-cases.json @@ -32,7 +32,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -220,7 +220,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -380,7 +380,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -595,7 +595,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -797,7 +797,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -1027,7 +1027,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -1296,7 +1296,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-sdk-warm-up.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-sdk-warm-up.json index 0d264bbf..751e85c1 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-sdk-warm-up.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-sdk-warm-up.json @@ -26,7 +26,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -248,7 +248,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { diff --git a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-transfers-error-cases.json b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-transfers-error-cases.json index 8b46d896..8a9444ed 100644 --- a/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-transfers-error-cases.json +++ b/collections/hub/sdk_scheme_adapter/bulk/basic/bulk-transfers-error-cases.json @@ -32,7 +32,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -339,7 +339,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -624,7 +624,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { @@ -928,7 +928,7 @@ "method": "post", "body": { "bulkHomeTransactionID": "abc123", - "bulkTransactionId": "{$function.generic.generateUUID}", + "bulkTransactionId": "{$function.generic.generateID}", "options": { "onlyValidateParty": true, "autoAcceptParty": { From 7662a311bcf30fc8d6749f7064de563a6e150b08 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 17 Oct 2024 21:56:26 +0530 Subject: [PATCH 38/39] fix: interscheme --- .../as_payee_scheme/happy_path/discovery.json | 6 +- .../as_payee_scheme/happy_path/quotes.json | 14 ++--- .../as_payee_scheme/happy_path/transfers.json | 10 ++-- .../negative_scenarios/discovery.json | 4 +- .../negative_scenarios/quotes.json | 4 +- .../negative_scenarios/transfers.json | 4 +- .../as_payer_scheme/happy_path/discovery.json | 6 +- .../as_payer_scheme/happy_path/quotes.json | 6 +- .../as_payer_scheme/happy_path/transfers.json | 10 ++-- .../negative_scenarios/discovery.json | 56 +++++++++---------- .../negative_scenarios/quotes.json | 32 +++++------ .../negative_scenarios/transfers.json | 12 ++-- rules/hub/rules_callback/default.json | 8 +-- rules/hub/rules_validation/default.json | 14 ++--- 14 files changed, 93 insertions(+), 93 deletions(-) diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json index 12ab7983..4abb8cbd 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json @@ -22,8 +22,8 @@ "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "nonexistentpayerfsp", "FSPIOP-Proxy": "{$inputs.PROXY1_NAME}", @@ -56,7 +56,7 @@ "id": 4, "description": "Callback content-type to be parties", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" ] }, { diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json index b9c9c99e..ffff2039 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/quotes.json @@ -21,8 +21,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "nonexistentpayerfsp", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -120,7 +120,7 @@ "id": 8, "description": "Callback content-type to be quotes", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" ] }, { @@ -199,8 +199,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" @@ -311,8 +311,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_OTHER_PROXY_PARTY_ID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYERFSP_OTHER_PROXY_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json index 6876e04e..d5a7fdcd 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json @@ -21,8 +21,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", @@ -113,7 +113,7 @@ "id": 7, "description": "Callback content-type to be quotes", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" ] }, { @@ -181,8 +181,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json index a1a91ff1..9f0be8bd 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json @@ -22,8 +22,8 @@ "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json index f97af521..34745ea5 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/quotes.json @@ -18,8 +18,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json index a66bf7e6..bfdd5a43 100644 --- a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json @@ -21,8 +21,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json index 620a2225..042043e4 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -22,8 +22,8 @@ "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" @@ -62,7 +62,7 @@ "id": 5, "description": "Callback content-type to be parties", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" ] }, { diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json index fddaf786..b2dba022 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json @@ -21,8 +21,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -113,7 +113,7 @@ "id": 7, "description": "Callback content-type to be quotes", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" ] }, { diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json index b7b48e45..cb09ac00 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json @@ -21,8 +21,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" @@ -112,7 +112,7 @@ "id": 7, "description": "Callback content-type to be quotes", "exec": [ - "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version=1.0')" + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" ] }, { @@ -180,8 +180,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json index 7a4afac7..4d062883 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/discovery.json @@ -22,8 +22,8 @@ "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}" }, "tests": { @@ -68,8 +68,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_2XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -110,8 +110,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_3XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -152,8 +152,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_4XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -194,8 +194,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYER_SCHEME_5XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -242,8 +242,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_NOT_IN_PAYER_PROXY_CACHE}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -291,8 +291,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_IN_PROXY}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -359,8 +359,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_2XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -415,8 +415,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_3XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -471,8 +471,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_4XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -527,8 +527,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_ERROR_PAYEE_SCHEME_5XXX}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -589,8 +589,8 @@ "ID": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID_ERROR}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" }, @@ -642,8 +642,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_ORACLE_ERROR}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" @@ -691,8 +691,8 @@ "ID": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_PAYER_SCHEME_CACHE_NOT_VALID}" }, "headers": { - "Accept": "application/vnd.interoperability.parties+json;version=1.0", - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json index a7691604..22d7b28e 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json @@ -18,8 +18,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -90,8 +90,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -173,8 +173,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -268,8 +268,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -343,8 +343,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -418,8 +418,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -493,8 +493,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -574,8 +574,8 @@ "operationPath": "/quotes", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.quotes+json;version=1.0", - "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", diff --git a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json index a9d98235..b3ebdc29 100644 --- a/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json @@ -21,8 +21,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -99,8 +99,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", @@ -177,8 +177,8 @@ "operationPath": "/transfers", "method": "post", "headers": { - "Accept": "application/vnd.interoperability.transfers+json;version=1.0", - "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}", diff --git a/rules/hub/rules_callback/default.json b/rules/hub/rules_callback/default.json index 0a79fd49..33ac9968 100644 --- a/rules/hub/rules_callback/default.json +++ b/rules/hub/rules_callback/default.json @@ -1184,7 +1184,7 @@ "path": "/parties/{Type}/{ID}", "params": { "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "FSPIOP-Source": "greenbankfsp" }, "body": { @@ -1325,7 +1325,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp", @@ -1398,7 +1398,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "", "FSPIOP-Source": "ttkpayeefsp", "FSPIOP-Destination": "nonexistentpayerfsp" @@ -1456,7 +1456,7 @@ "path": "/parties/{Type}/{ID}", "params": { "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0" + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0" }, "body": { "party": { diff --git a/rules/hub/rules_validation/default.json b/rules/hub/rules_validation/default.json index 4569af05..ec843a53 100644 --- a/rules/hub/rules_validation/default.json +++ b/rules/hub/rules_validation/default.json @@ -42,7 +42,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "FSPIOP-Source": "proxyttk", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -102,7 +102,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -162,7 +162,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -222,7 +222,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -282,7 +282,7 @@ "scriptingEngine": "postman" }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -348,7 +348,7 @@ } }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "nonexistentpayeefsp", "FSPIOP-Destination": "testingtoolkitdfsp" @@ -948,7 +948,7 @@ } }, "headers": { - "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "Content-Type": "application/vnd.interoperability.parties+json;version=2.0", "Date": "Tue, 23 Jul 2024 02:05:53 GMT", "FSPIOP-Source": "ttkpayeefsp", "FSPIOP-Destination": "nonexistentpayerfsp" From 90f201b29be2e4ec4bcdf725083ed8d6554bb0f4 Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 23 Oct 2024 22:11:15 +0530 Subject: [PATCH 39/39] feat: add fx receive test case --- .../happy_path/fx_p2p_receive.json | 1094 +++++++++++++++++ 1 file changed, 1094 insertions(+) create mode 100644 collections/hub/golden_path/fx/feature_tests/happy_path/fx_p2p_receive.json diff --git a/collections/hub/golden_path/fx/feature_tests/happy_path/fx_p2p_receive.json b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_p2p_receive.json new file mode 100644 index 00000000..643ffafe --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_p2p_receive.json @@ -0,0 +1,1094 @@ +{ + "options": {}, + "name": "hub_golden_path_fx_feature_tests_happy_path_fx_p2p_receive", + "test_cases": [ + { + "id": 1, + "name": "Happy Path FX E2E RECEIVE", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/happy_path/fx_p2p_receive.json", + "labels": [ + "fx" + ] + }, + "meta": { + "info": "FX Transfer RECEIVE" + }, + "breakOnError": false, + "requests": [ + { + "id": 1, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.1/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.1/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.1/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.1/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.1/trigger_templates" + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.FX_MSISDN_1}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.FX_MSISDN_1}" + }, + "body": { + "fspId": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "FSPIOP-Source": "{$inputs.FX_PAYEE_DFSP_ID}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "disabled": false + }, + { + "id": 2, + "description": "Get party info", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "additionalApi": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/parties/{Type}/{ID}", + "path": "/parties/MSISDN/{$inputs.FX_MSISDN_1}", + "method": "get", + "params": { + "Type": "MSISDN", + "ID": "{$inputs.FX_MSISDN_1}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "Accept": "{$inputs.acceptParties}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 8, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.FX_MSISDN_1}')" + ] + } + ] + } + }, + { + "id": 5, + "description": "POST /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/quotes", + "path": "/quotes", + "method": "post", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.fromIdValue}", + "fspId": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$prev.2.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.2.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.2.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "RECEIVE", + "amount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$inputs.FX_TARGET_AMOUNT}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + } + }, + { + "id": 4, + "description": "POST /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxQuotes", + "path": "/fxQuotes", + "method": "post", + "body": { + "conversionRequestId": "{$function.generic.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$prev.5.request.body.transactionId}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "RECEIVE", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}" + }, + "targetAmount": { + "currency": "{$inputs.FX_TARGET_CURRENCY}", + "amount": "{$prev.5.callback.body.transferAmount.amount}" + }, + "expiration": "{$inputs.FX_EXPIRATION}" + } + }, + "headers": { + "Accept": "{$inputs.acceptFxQuotes}", + "Content-Type": "{$inputs.contentTypeFxQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain conversionTerms", + "exec": [ + "expect(callback.body).to.have.property('conversionTerms')" + ] + }, + { + "id": 6, + "description": "Callback sourceAmount (amount & currency) to match the request", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "request.body.conversionTerms.sourceAmount.amount && expect(callback.body.conversionTerms.sourceAmount.amount).to.equal('{$request.body.conversionTerms.sourceAmount.amount}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be fxQuotes", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxQuotes+json')" + ] + }, + { + "id": 16, + "description": "Callback body should contain condition", + "exec": [ + "expect(callback.body).to.have.property('condition')" + ] + }, + { + "id": 17, + "description": "Callback body should contain target amount", + "exec": [ + "expect(callback.body.conversionTerms.targetAmount).to.have.property('amount')" + ] + }, + { + "id": 18, + "description": "Callback transferAmount (amount & currency)to match the request Copy", + "exec": [ + "expect(callback.body.conversionTerms.sourceAmount.currency).to.equal('{$request.body.conversionTerms.sourceAmount.currency}')", + "expect(callback.body.conversionTerms.targetAmount.currency).to.equal('{$request.body.conversionTerms.targetAmount.currency}')" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = callback.body;", + "", + "environment.fxSourceAmount = res.conversionTerms.sourceAmount.amount" + ] + } + } + }, + { + "id": 6, + "description": "Get Accounts for Payer BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance before FxTransfer=${environment.payerPositionBalanceBeforeFxTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 7, + "description": "Get Accounts for Payee BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance before FxTransfer=${environment.payeePositionBalanceBeforeFxTransfer}`);", + "" + ] + } + } + }, + { + "id": 8, + "description": "Get Accounts for FXP BEFORE fxTransfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`FXP Source Currency Position Balance before FxTransfer=${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer}`);", + "", + "console.log(`FXP Target Currency Position Balance before FxTransfer=${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer}`);" + ] + } + } + }, + { + "id": 9, + "description": "POST /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers", + "path": "/fxTransfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_TESTFXP1_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "RECEIVE", + "sourceAmount": { + "amount": "{$prev.4.callback.body.conversionTerms.sourceAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.sourceAmount.currency}" + }, + "targetAmount": { + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.currency}" + }, + "condition": "{$prev.4.callback.body.condition}", + "expiration": "{$requestVariables.expiration}" + }, + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback length not zero", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 10, + "description": "Get Accounts for Payer AFTER fx transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYER_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "disabled": false, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer).to.not.equal(environment.payerPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfterFxTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payer Position Balance after Transfer=${environment.payerPositionBalanceAfterFxTransfer}`);" + ] + } + } + }, + { + "id": 11, + "description": "Get Accounts for FXP AFTER fx transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payer position should be changed", + "exec": [ + "expect(environment.payerPositionBalanceAfterFxTransfer-environment.payerPositionBalanceBeforeFxTransfer).to.equal(+environment.fxSourceAmount)" + ] + }, + { + "id": 3, + "description": "FXP Source currency position should not be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer)" + ] + }, + { + "id": 4, + "description": "FXP Target currency position should not be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "// console.log(`FXP Source Currency Position Balance after Transfer=${environment.fxpSourceCurrencyPositionBalanceAfterTransfer}`);", + "", + "// console.log(`FXP Target Currency Position Balance after Transfer=${environment.fxpTargetCurrencyPositionBalanceAfterTransfer}`);", + "", + "console.log(`Payer Position ${environment.FX_SOURCE_CURRENCY} : ${environment.payerPositionBalanceBeforeFxTransfer} -> ${environment.payerPositionBalanceAfterTransfer} (${environment.payerPositionBalanceAfterTransfer - environment.payerPositionBalanceBeforeFxTransfer})`);", + "console.log(`Payee Position ${environment.FX_TARGET_CURRENCY} : ${environment.payeePositionBalanceBeforeFxTransfer} -> ${environment.payeePositionBalanceAfterTransfer} (${environment.payeePositionBalanceAfterTransfer - environment.payeePositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Source Currency ${environment.FX_SOURCE_CURRENCY} : ${environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpSourceCurrencyPositionBalanceAfterTransfer} (${environment.fxpSourceCurrencyPositionBalanceAfterTransfer - environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer})`);", + "console.log(`FXP Target Currency ${environment.FX_TARGET_CURRENCY} : ${environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer} -> ${environment.fxpTargetCurrencyPositionBalanceAfterTransfer} (${environment.fxpTargetCurrencyPositionBalanceAfterTransfer - environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer})`);" + ] + } + } + }, + { + "id": 15, + "description": "Get FxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.9.request.body.commitRequestId}", + "method": "get", + "params": { + "ID": "{$prev.9.request.body.commitRequestId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('RESERVED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + } + ] + } + }, + { + "id": 12, + "description": "POST /transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/transfers", + "path": "/transfers", + "method": "post", + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "body": { + "transferId": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "payeeFsp": "{$inputs.FX_PAYEE_DFSP_ID}", + "payerFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$prev.5.callback.body.transferAmount.currency}", + "amount": "{$prev.5.callback.body.transferAmount.amount}" + }, + "ilpPacket": "{$prev.5.callback.body.ilpPacket}", + "condition": "{$prev.5.callback.body.condition}", + "expiration": "{$prev.5.callback.body.expiration}" + }, + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "disabled": false, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(callback.body.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$prev.4.callback.headers.fspiop-destination}')" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 13, + "description": "Get Accounts for FXP AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_TESTFXP1_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_TESTFXP1_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 3, + "description": "FXP Source currency position should be changed", + "exec": [ + "expect(environment.fxpSourceCurrencyPositionBalanceAfterTransfer-environment.fxpSourceCurrencyPositionBalanceBeforeFxTransfer).to.equal(-environment.fxSourceAmount)" + ] + }, + { + "id": 4, + "description": "FXP Target currency position should be changed", + "exec": [ + "expect(environment.fxpTargetCurrencyPositionBalanceAfterTransfer).to.not.equal(environment.fxpTargetCurrencyPositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_SOURCE_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpSourceCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.fxpTargetCurrencyPositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "" + ] + } + } + }, + { + "id": 14, + "description": "Get Accounts for Payee AFTER transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin", + "specFile": "spec_files/api_definitions/central_admin_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/central_admin_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/central_admin_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/central_admin_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/central_admin_1.0/trigger_templates" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.FX_PAYEE_DFSP_ID}/accounts", + "method": "get", + "params": { + "name": "{$inputs.FX_PAYEE_DFSP_ID}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Payee position should be changed", + "exec": [ + "expect(environment.payeePositionBalanceAfterTransfer).to.not.equal(environment.payeePositionBalanceBeforeFxTransfer)" + ] + } + ] + }, + "disabled": false, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.FX_TARGET_CURRENCY).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfterTransfer= curAccount.value", + " }", + "})", + "", + "console.log(`Payee Position Balance after Transfer=${environment.payeePositionBalanceAfterTransfer}`);", + "", + "" + ] + } + } + }, + { + "id": 16, + "description": "Get FxTransfers after final transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates" + }, + "operationPath": "/fxTransfers/{ID}", + "path": "/fxTransfers/{$prev.9.request.body.commitRequestId}", + "method": "get", + "params": { + "ID": "{$prev.9.request.body.commitRequestId}" + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "headers": { + "Accept": "{$inputs.acceptFxTransfers}", + "Content-Type": "{$inputs.contentTypeFxTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.FX_PAYER_DFSP_ID}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(callback.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback conversionState to be RESERVED", + "exec": [ + "expect(callback.body.conversionState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be fxTransfers", + "exec": [ + "expect(callback.headers['content-type']).to.have.string('application/vnd.interoperability.fxTransfers+json')" + ] + }, + { + "id": 8, + "description": "Callback body should contain fulfilment", + "exec": [ + "expect(callback.body).to.have.property('fulfilment')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file