From 873ccb2a58b7cdc85ae2a95affab31465300d258 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Fri, 2 Aug 2024 12:55:25 +0300 Subject: [PATCH] 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"