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/golden_path/api-tests/SettlementWindows/settlementadmin.json b/collections/hub/golden_path/api-tests/SettlementWindows/settlementadmin.json index 281512ef..a55e09c8 100644 --- a/collections/hub/golden_path/api-tests/SettlementWindows/settlementadmin.json +++ b/collections/hub/golden_path/api-tests/SettlementWindows/settlementadmin.json @@ -187,7 +187,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/api-tests/SettlementWindows/settlementadmin.json" + "path": "hub/golden_path/api-tests/SettlementWindows/settlementadmin.json", + "labels": [ + "prod-tests" + ] } } ] 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 a36af446..803537ec 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 @@ -218,7 +218,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json" + "path": "hub/golden_path/api-tests/admin-api-tests/Admintests-20201221.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/api-tests/master.json b/collections/hub/golden_path/api-tests/master.json index 5c7a1d10..fe5e77c2 100644 --- a/collections/hub/golden_path/api-tests/master.json +++ b/collections/hub/golden_path/api-tests/master.json @@ -4,10 +4,6 @@ "name": "admin-api-tests", "type": "folder" }, - { - "name": "Quotes", - "type": "folder" - }, { "name": "SettlementWindows", "type": "folder" 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..30059b7b 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}", @@ -274,7 +274,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Test for 4 decimal points #949.json" + "path": "hub/golden_path/bug fixes/Test for 4 decimal points #949.json", + "labels": [ + "prod-tests" + ] } } ] 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..103744e6 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}", @@ -218,7 +218,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json" + "path": "hub/golden_path/bug fixes/Test for Bugfix #1378 - extension list missing.json", + "labels": [ + "prod-tests" + ] } } ] 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..66587485 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 @@ -8,7 +8,10 @@ "info": "p2p_money_transfer - payee_request_for_notification_v.1.1" }, "fileInfo": { - "path": "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" + "path": "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", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -33,8 +36,8 @@ "FSPIOP-Destination": "ttkpayeefsp" }, "body": { - "quoteId": "{$environment.quiteId}", - "transactionId": "{$environment.transfer_ID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -156,9 +159,6 @@ }, "preRequest": { "exec": [ - "const uuid = require('uuid')", - "pm.environment.set('transfer_ID', uuid.v4())", - "pm.environment.set('quiteId', uuid.v4())", "pm.environment.set('patchAmount', '104')", "" ] @@ -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('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { @@ -374,7 +374,10 @@ "info": "p2p_money_transfer - payee_request_for_notification_v.1.1" }, "fileInfo": { - "path": "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" + "path": "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", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -399,8 +402,8 @@ "FSPIOP-Destination": "ttkpayeefsp" }, "body": { - "quoteId": "{$environment.quiteId}", - "transactionId": "{$environment.transfer_ID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -522,9 +525,6 @@ }, "preRequest": { "exec": [ - "const uuid = require('uuid')", - "pm.environment.set('transfer_ID', uuid.v4())", - "pm.environment.set('quiteId', uuid.v4())", "pm.environment.set('patchAmount', '102')", "" ] @@ -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('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { @@ -666,14 +666,6 @@ "", "expect(environment.payeeCallbackNotification.body.transferState).to.equal('ABORTED')" ] - }, - { - "id": 16, - "description": "Payee Notification extension cause contains 'fspiop-destination does not match payer fsp on the Fulfil callback response'", - "exec": [ - "expect(environment.payeeCallbackNotification.body.extensionList.extension[0].value).contains('fspiop-destination does not match payer fsp on the Fulfil callback response')", - "" - ] } ] }, 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..14e79207 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": { @@ -166,23 +166,9 @@ }, { "id": 2, - "description": "Check Malformed syntax", + "description": "Check Error code 3100", "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Malformed syntax');" - ] - }, - { - "id": 3, - "description": "Check Transfer Id is included in error", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Transfer Id');" - ] - }, - { - "id": 4, - "description": "Check Error code 3101", - "exec": [ - "expect(response.body.errorInformation.errorCode).to.include('3101');" + "expect(response.body.errorInformation.errorCode).to.include('3100');" ] } ] @@ -197,7 +183,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json" + "path": "hub/golden_path/bug fixes/Test for Bugfix #742 - Error code check.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json b/collections/hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json index 75bf4308..c379c0f3 100644 --- a/collections/hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json +++ b/collections/hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json @@ -142,7 +142,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json" + "path": "hub/golden_path/bug fixes/Test for Bugfix #849 - missing ID for transfers and quotes.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json b/collections/hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json index b9477368..7e2aecd4 100644 --- a/collections/hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json +++ b/collections/hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json @@ -270,7 +270,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json" + "path": "hub/golden_path/bug fixes/Tests for Bugfix #1009 - ML Adapter and ALS service health should include broker status.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json b/collections/hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json index 64bee971..03b92136 100644 --- a/collections/hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json +++ b/collections/hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json @@ -166,7 +166,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json" + "path": "hub/golden_path/bug fixes/Tests for Bugfix #981 - Fix 500 http code instead of 400.json", + "labels": [ + "prod-tests" + ] } } ] 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..dcc4e506 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}", @@ -245,9 +245,12 @@ "description": "Check Modified request - Duplicate Quote before expire time", "exec": [ "if (!environment.SIMPLE_ROUTING_MODE_ENABLED) {", - " expect(callback.body.errorInformation.errorDescription).to.include('Modified request');", - "}", - "" + " if(environment.API_TYPE === 'fspiop') {", + " expect(typeof callback.body.errorInformation.errorDescription).to.include('Modified request');", + " } else {", + " expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined);", + " }", + "}" ] }, { @@ -307,7 +310,7 @@ }, "body": { "quoteId": "{$environment.quoteidx}", - "transactionId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -355,7 +358,11 @@ "description": "Check Modified request - Duplicate Quote before expire time", "exec": [ "if (!environment.SIMPLE_ROUTING_MODE_ENABLED) {", - " expect(callback.body.errorInformation.errorDescription).to.include('Modified request');", + " if(environment.API_TYPE === 'fspiop') {", + " expect(typeof callback.body.errorInformation.errorDescription).to.include('Modified request');", + " } else {", + " expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined);", + " }", "}" ] }, @@ -396,6 +403,7 @@ "fileInfo": { "path": "hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json", "labels": [ + "prod-tests", "quotes" ] } @@ -431,8 +439,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 +526,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 +613,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}", @@ -654,7 +662,9 @@ "id": 2, "description": "Check Missing mandatory element", "exec": [ - " expect(response.body.errorInformation.errorDescription).to.include('Unsupported Media Type');" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.errorInformation.errorDescription).to.include('Invalid content-type');", + "}" ] }, { @@ -692,8 +702,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}", @@ -739,9 +749,9 @@ }, { "id": 2, - "description": "Check Destination FSP Error - Unsupported participant", + "description": "Check Error description exists", "exec": [ - " expect(callback.body.errorInformation.errorDescription).to.include('Destination FSP Error - Unsupported participant');" + " expect(callback.body.errorInformation).to.have.property('errorDescription');" ] }, { @@ -779,8 +789,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}", @@ -837,13 +847,6 @@ "exec": [ "expect(response.body.errorInformation.errorCode).to.eql('3100');" ] - }, - { - "id": 4, - "description": "Check partyIdentifier is included in Error description", - "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('partyIdentifier');" - ] } ] } @@ -873,8 +876,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 +951,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": { @@ -975,7 +978,7 @@ "amount": "1" }, "expiration": "2019-10-14T20:19:20.741Z", - "ilpPacket": "AQAAAAAAAADIEHByaXZhdGUucGF5ZWVmc3CCAiB7InRyYW5zYWN0aW9uSWQiOiIyZGY3NzRlMi1mMWRiLTRmZjctYTQ5NS0yZGRkMzdhZjdjMmMiLCJxdW90ZUlkIjoiMDNhNjA1NTAtNmYyZi00NTU2LThlMDQtMDcwM2UzOWI4N2ZmIiwicGF5ZWUiOnsicGFydHlJZEluZm8iOnsicGFydHlJZFR5cGUiOiJNU0lTRE4iLCJwYXJ0eUlkZW50aWZpZXIiOiIyNzcxMzgwMzkxMyIsImZzcElkIjoicGF5ZWVmc3AifSwicGVyc29uYWxJbmZvIjp7ImNvbXBsZXhOYW1lIjp7fX19LCJwYXllciI6eyJwYXJ0eUlkSW5mbyI6eyJwYXJ0eUlkVHlwZSI6Ik1TSVNETiIsInBhcnR5SWRlbnRpZmllciI6IjI3NzEzODAzOTExIiwiZnNwSWQiOiJwYXllcmZzcCJ9LCJwZXJzb25hbEluZm8iOnsiY29tcGxleE5hbWUiOnt9fX0sImFtb3VudCI6eyJjdXJyZW5jeSI6IlVTRCIsImFtb3VudCI6IjIwMCJ9LCJ0cmFuc2FjdGlvblR5cGUiOnsic2NlbmFyaW8iOiJERVBPU0lUIiwic3ViU2NlbmFyaW8iOiJERVBPU0lUIiwiaW5pdGlhdG9yIjoiUEFZRVIiLCJpbml0aWF0b3JUeXBlIjoiQ09OU1VNRVIiLCJyZWZ1bmRJbmZvIjp7fX19" + "ilpPacket": "{$inputs.ilpPacket}" }, "tests": { "assertions": [ @@ -994,6 +997,16 @@ ] } ] + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "if(environment.API_TYPE != 'fspiop') {", + " custom.skipRequest()", + "}" + ] + } } }, { @@ -1009,10 +1022,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 +1074,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 +1149,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": { @@ -1160,16 +1173,16 @@ }, { "id": 2, - "description": "Check Missing mandatory element", + "description": "Check validation error", "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element');" + "expect(response.body.errorInformation.errorDescription).to.include('Malformed syntax');" ] }, { "id": 3, - "description": "Check error code 3102", + "description": "Check error code 3101", "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3102');" + "expect(response.body.errorInformation.errorCode).to.equal('3101');" ] }, { @@ -1186,6 +1199,7 @@ "fileInfo": { "path": "hub/golden_path/bug fixes/Tests for Bugfix #990 and #1016 - Quotes.json", "labels": [ + "prod-tests", "quotes" ] } 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..dc0e9ae7 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}", @@ -138,7 +138,7 @@ "id": 15, "description": "Test Passed - Because didn't get request at payeefsp request URL", "exec": [ - "expect(environment.payercallbackx.data.errorInformation.errorDescription).to.equal('Generic client error - Not found');" + "expect(environment.payercallbackx.data.errorInformation.errorCode).to.equal('3000');" ] } ] @@ -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}", @@ -341,9 +341,10 @@ "fileInfo": { "path": "hub/golden_path/bug fixes/Tests for Bugfix #998 - Quoting service not using most recent endpoint.json", "labels": [ + "prod-tests", "quotes" ] } } ] -} +} \ No newline at end of file diff --git a/collections/hub/golden_path/bug fixes/master.json b/collections/hub/golden_path/bug fixes/master.json index 7a645e4f..70cbb633 100644 --- a/collections/hub/golden_path/bug fixes/master.json +++ b/collections/hub/golden_path/bug fixes/master.json @@ -4,10 +4,6 @@ "name": "other-bug-fixes.json", "type": "file" }, - { - "name": "Test for 4 decimal points #949.json", - "type": "file" - }, { "name": "Test for Bugfix #1378 - extension list missing.json", "type": "file" @@ -45,6 +41,10 @@ { "name": "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", "type": "file" + }, + { + "name": "Test for 4 decimal points #949.json", + "type": "file" } ] } \ 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..7ba09554 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,12 @@ "meta": { "info": "Check Settlements Error #956" }, + "fileInfo": { + "path": "hub/golden_path/bug fixes/other-bug-fixes.json", + "labels": [ + "prod-tests" + ] + }, "requests": [ { "id": 6, @@ -58,83 +65,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": { @@ -163,7 +93,7 @@ "FSPIOP-HTTP-Method": "POST" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.SIMPAYER_NAME}", "payeeFsp": "payeefspNOTFOUND", "amount": { @@ -193,13 +123,17 @@ }, { "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');" ] } ] }, + "params": { + "Type": "", + "ID": "" + }, "scripts": { "preRequest": { "exec": [ @@ -224,10 +158,7 @@ } } } - ], - "fileInfo": { - "path": "hub/golden_path/bug fixes/other-bug-fixes.json" - } + ] } ] } \ No newline at end of file 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..63ea9402 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", @@ -203,7 +203,7 @@ "description": "Payer side Callback Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -239,7 +239,11 @@ "description": "Payer side Callback Body - Error Description is Destination FSP Error", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')", + " if(environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')", + " } else {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)", + " }", "}" ] } @@ -382,7 +386,7 @@ "description": "Payer side Callback Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -418,7 +422,11 @@ "description": "Payer side Callback Body - Error Description is Generic validation error", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic validation error - Participant')", + " if(environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic validation error - Participant')", + " } else {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)", + " }", "}" ] } @@ -489,8 +497,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", @@ -620,7 +628,7 @@ "description": "Payee side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -629,7 +637,7 @@ "description": "Payee side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -869,7 +877,7 @@ "description": "Payee side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -878,7 +886,7 @@ "description": "Payee side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -978,8 +986,11 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json" + "path": "hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participant.json", + "labels": [ + "prod-tests" + ] } } ] -} +} \ No newline at end of file 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..959e528f 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", @@ -240,7 +240,7 @@ "description": "Payer side Callback Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -276,7 +276,11 @@ "description": "Payer side Callback Body - Error Description is Destination FSP Error", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')", + " if(environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Unsupported participant')", + " } else {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)", + " }", "}" ] } @@ -418,7 +422,7 @@ "description": "Payer side Callback Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim1Callback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -442,19 +446,23 @@ }, { "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')", + " if(environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.include('Generic ID not found - Payer proxy or payee proxy not found')", + " } else {", + " expect(requestVariables.sim1Callback.data.errorInformation['errorDescription']).to.not.equal(undefined)", + " }", "}" ] } @@ -524,8 +532,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", @@ -656,7 +664,7 @@ "description": "Payee side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -665,7 +673,7 @@ "description": "Payee side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -902,7 +910,7 @@ "description": "Payee side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.sim2Request.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -911,7 +919,7 @@ "description": "Payee side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.sim2Request.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -1010,8 +1018,11 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json" + "path": "hub/golden_path/feature_tests/Active_Inactive_participants/active_and_inactive_participants_accounts.json", + "labels": [ + "prod-tests" + ] } } ] -} +} \ No newline at end of file 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..6439e73b 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 @@ -8,7 +8,10 @@ "info": "This is a test to validate that ACCEPT and CONTENT-TYPE headers are correctly validated for both legacy (Old) and not\n-supported (NotSupported)" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json" + "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -323,7 +326,10 @@ "info": "This is a test to validate that ACCEPT and CONTENT-TYPE headers are correctly validated for both legacy (Old) and not\n-supported (NotSupported)" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json" + "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -477,8 +483,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}", @@ -607,7 +613,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -681,8 +687,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 +813,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}", @@ -919,7 +925,10 @@ "info": "This is a test to validate that ACCEPT and CONTENT-TYPE headers are correctly validated for both legacy (Old) and not\n-supported (NotSupported)" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json" + "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -1069,8 +1078,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}", @@ -1199,7 +1208,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -1360,7 +1369,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -1600,7 +1609,10 @@ "id": 4, "name": "fspiop_protocol_validation - Transaction-Requests-Service", "fileInfo": { - "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json" + "path": "hub/golden_path/feature_tests/backward_compatibility/fspiop_protocol_validation.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { diff --git a/collections/hub/golden_path/feature_tests/block_transfer.json b/collections/hub/golden_path/feature_tests/block_transfer.json index e6ebb873..1ce39a7e 100644 --- a/collections/hub/golden_path/feature_tests/block_transfer.json +++ b/collections/hub/golden_path/feature_tests/block_transfer.json @@ -8,7 +8,10 @@ "info": "Block Transfer" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/block_transfer.json" + "path": "hub/golden_path/feature_tests/block_transfer.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -220,7 +223,7 @@ "description": "Payee FSP: 'fspiop-signature' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature'])", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature'])", "}", "" ] @@ -230,7 +233,7 @@ "description": "Payee FSP 'accept' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -239,7 +242,7 @@ "description": "Payee FSP 'content-type' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -328,8 +331,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}`)", "", @@ -359,7 +362,7 @@ " ", " console.log(`liquidityAndPositionDifference=${liquidityAndPositionDifference}`);", "", - "requestVariables.amount = Number((liquidityAndPositionDifference + 1000).toFixed(2));", + "requestVariables.amount = Number((liquidityAndPositionDifference + 1000).toFixed(0));", "", "console.log(`requestVariables.amount=${requestVariables.amount}`)", "", @@ -452,7 +455,11 @@ "id": 3, "description": "Error description should be returned", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('Payer FSP insufficient liquidity');" + "if(environment.API_TYPE === 'fspiop') {", + "expect(typeof callback.body.errorInformation.errorDescription).to.equal('string');", + "} else {", + "expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined);", + "}" ] }, { @@ -626,7 +633,10 @@ "info": "Block Transfer due to NDC limit" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/block_transfer.json" + "path": "hub/golden_path/feature_tests/block_transfer.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -1024,7 +1034,7 @@ "description": "Payee FSP: 'fspiop-signature' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature'])", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature'])", "}", "" ] @@ -1034,7 +1044,7 @@ "description": "Payee FSP 'accept' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -1043,7 +1053,7 @@ "description": "Payee FSP 'content-type' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -1132,8 +1142,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}`)", "", @@ -1161,7 +1171,7 @@ " ", "console.log(`positionLimitDifference=${positionLimitDifference}`);", "", - "requestVariables.amount = Number((positionLimitDifference + 1).toFixed(2));", + "requestVariables.amount = Number((positionLimitDifference + 1).toFixed(0));", "", "console.log(`requestVariables.amount=${requestVariables.amount}`)", "", @@ -1254,7 +1264,7 @@ "id": 3, "description": "Error description should be returned", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('Payer limit error');" + "expect(callback.body.errorInformation).to.have.property('errorDescription');" ] }, { 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..49a3e69c 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}", @@ -516,7 +516,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json" + "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json", + "labels": [ + "prod-tests" + ] } }, { @@ -551,8 +554,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}", @@ -914,7 +917,7 @@ "id": 7, "description": "Payee Side Callback Header - content-type is same", "exec": [ - "expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['content-type'])", "" ] }, @@ -946,8 +949,11 @@ "id": 11, "description": "Payee Side Callback Body - Response Error Description is Modified request", "exec": [ + "if (environment.API_TYPE === 'fspiop') {", "expect(requestVariables.payeeCallback.body.errorInformation['errorDescription']).to.equal('Modified request')", - "" + "} else {", + "expect(requestVariables.payeeCallback.body.errorInformation['errorDescription']).to.not.equal(undefined)", + "}" ] } ] @@ -968,7 +974,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json" + "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_commit.json", + "labels": [ + "prod-tests" + ] } } ] 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..a7348c15 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}", @@ -511,7 +511,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json" + "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json", + "labels": [ + "prod-tests" + ] } }, { @@ -546,8 +549,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}", @@ -1030,7 +1033,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json" + "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/fulfill_reject.json", + "labels": [ + "prod-tests" + ] } } ] 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..254d2c66 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 @@ -60,7 +60,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Test PayeeFSP", @@ -95,8 +96,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}", @@ -216,7 +217,7 @@ "description": "Payee Side Request Header - fspiop-signature is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature'])", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature'])", "}" ] }, @@ -225,7 +226,7 @@ "description": "Payee Side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -234,7 +235,7 @@ "description": "Payee Side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -243,7 +244,7 @@ "description": "Payee Side Request Header - fspiop-uri is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-uri']).to.equal(request.headers['fspiop-uri'])", + " expect(requestVariables.payeeRequest.headers['fspiop-uri']).to.equal(requestSent.headers['fspiop-uri'])", "}" ] }, @@ -252,7 +253,7 @@ "description": "Payee Side Request Header - fspiop-http-method is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-http-method']).to.equal(request.headers['fspiop-http-method'])", + " expect(requestVariables.payeeRequest.headers['fspiop-http-method']).to.equal(requestSent.headers['fspiop-http-method'])", "}" ] }, @@ -292,7 +293,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}')", "" @@ -480,7 +481,7 @@ "description": "Payee Side Request Header - fspiop-signature is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature'])", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature'])", "}" ] }, @@ -489,7 +490,7 @@ "description": "Payee Side Request Header - accept is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -498,7 +499,7 @@ "description": "Payee Side Request Header - content-type is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -507,7 +508,7 @@ "description": "Payee Side Request Header - fspiop-uri is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-uri']).to.equal(request.headers['fspiop-uri'])", + " expect(requestVariables.payeeRequest.headers['fspiop-uri']).to.equal(requestSent.headers['fspiop-uri'])", "}" ] }, @@ -516,7 +517,7 @@ "description": "Payee Side Request Header - fspiop-http-method is same", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-http-method']).to.equal(request.headers['fspiop-http-method'])", + " expect(requestVariables.payeeRequest.headers['fspiop-http-method']).to.equal(requestSent.headers['fspiop-http-method'])", "}" ] }, @@ -610,7 +611,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 +753,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}')", "" ] }, @@ -820,7 +821,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json" + "path": "hub/golden_path/feature_tests/duplicate_handling/transfers/original_transfer_at_committed.json", + "labels": [ + "prod-tests" + ] } } ] 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..6cf47a88 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", @@ -444,7 +444,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/funds_in/funds_in_ttk.json" + "path": "hub/golden_path/feature_tests/funds_in/funds_in_ttk.json", + "labels": [ + "prod-tests" + ] } } ] 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..197eb924 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", @@ -841,7 +841,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json" + "path": "hub/golden_path/feature_tests/funds_out/Reserve&Abort/funds_out_abort.json", + "labels": [ + "prod-tests" + ] } } ] 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..2122a6f2 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", @@ -841,7 +841,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json" + "path": "hub/golden_path/feature_tests/funds_out/Reserve&Commit/funds_out_commit.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/feature_tests/get_transfers.json b/collections/hub/golden_path/feature_tests/get_transfers.json index 020b03da..330e9647 100644 --- a/collections/hub/golden_path/feature_tests/get_transfers.json +++ b/collections/hub/golden_path/feature_tests/get_transfers.json @@ -103,7 +103,7 @@ "description": "Payee FSP: 'fspiop-signature' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature'])", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature'])", "}", "", "" @@ -114,7 +114,7 @@ "description": "Payee FSP 'accept' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept'])", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept'])", "}" ] }, @@ -123,7 +123,7 @@ "description": "Payee FSP 'content-type' is same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -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)", @@ -314,7 +314,7 @@ "description": "Payee FSP: 'content-type' should be same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type']);", + " expect(requestVariables.payeeRequest.headers['content-type']).to.equal(request.headers['content-type']);", "}" ] }, @@ -323,7 +323,7 @@ "description": "Payee FSP: 'accept' should be same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['Accept']);", + " expect(requestVariables.payeeRequest.headers['accept']).to.equal(request.headers['accept']);", "}" ] }, @@ -332,7 +332,7 @@ "description": "Payee FSP: 'fspiop-signature' should be same as sent in the request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(request.headers['fspiop-signature']);", + " expect(requestVariables.payeeRequest.headers['fspiop-signature']).to.equal(requestSent.headers['fspiop-signature']);", "}" ] }, @@ -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}');" ] @@ -679,7 +679,7 @@ "description": "Payee FSP: 'content-type' should be same as request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -807,7 +807,7 @@ "description": "Payee FSP: 'content-type' should be same as request", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['Content-Type'])", + " expect(requestVariables.payeeCallback.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -861,7 +861,11 @@ "description": "Payee FSP: Error Description should be returned", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - " expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.equal('Generic client error')", + " if(environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.equal('Generic client error')", + " } else {", + " expect(requestVariables.payeeCallback.data.errorInformation.errorDescription).to.not.equal(undefined)", + " }", "}" ] } @@ -981,7 +985,11 @@ "id": 11, "description": "Payer FSP: Error Description should be returned", "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('Transfer ID not found - Provided Transfer ID was not found on the server.')" + "if(environment.API_TYPE === 'fspiop') {", + "expect(callback.body.errorInformation.errorDescription).to.equal('Transfer ID not found - Provided Transfer ID was not found on the server.')", + "} else {", + "expect(callback.body.errorInformation.errorDescription).to.not.equal(undefined)", + "}" ] } ] @@ -989,7 +997,7 @@ "scripts": { "preRequest": { "exec": [ - "requestVariables.transferId = '{$function.generic.generateUUID}'" + "requestVariables.transferId = '{$function.generic.generateID}'" ] }, "postRequest": { @@ -1001,7 +1009,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/get_transfers.json" + "path": "hub/golden_path/feature_tests/get_transfers.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/master.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/master.json index 5abfe923..22ccd64a 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/master.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/master.json @@ -23,6 +23,13 @@ { "name": "p2p_happy_path_with_balance_checks.json", "type": "file" + }, + { + "name": "p2p_happy_path_with_balance_checks_ttk.json", + "type": "file", + "labels": [ + "min-func-tests" + ] } ] } \ No newline at end of file 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..6b810aa8 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 @@ -5,11 +5,13 @@ "id": 1, "name": "p2p_money_transfer - p2p_happy_path RECEIVE_QUOTE", "meta": { - "info": "This is a happy path to test an end to end transfers. It includes party lookup, quote and transfer phases." + "info": "This is a happy path to test an end to end transfers. It includes party lookup, quote and transfer phases.", + "executionOrder": 1010 }, "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json", "labels": [ + "prod-tests", "p2p" ] }, @@ -83,7 +85,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Test PayeeFSP", @@ -242,9 +245,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}", @@ -373,7 +376,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -534,7 +537,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, 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..d8e5b1ff 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 @@ -77,7 +77,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toAccentIdFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Seán François Nuñez", @@ -236,8 +237,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}", @@ -374,7 +375,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -535,7 +536,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -581,9 +582,10 @@ "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_accent_unicode.json", "labels": [ + "prod-tests", "p2p" ] } } ] -} +} \ No newline at end of file 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..e2b49567 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 @@ -77,7 +77,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toBurmeseIdFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "ကောင်းထက်စံ အောင် ဒေါ်သန္တာထွန်", @@ -236,8 +237,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}", @@ -374,7 +375,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -535,7 +536,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -581,9 +582,10 @@ "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_burmese_unicode.json", "labels": [ + "prod-tests", "p2p" ] } } ] -} +} \ No newline at end of file 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..e9c90bd0 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 @@ -78,7 +78,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Test PayeeFSP", @@ -174,7 +175,9 @@ "exec": [ "expect(callback.body.party.partyIdInfo.partyIdType).to.equal('{$inputs.toIdType}')", "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.toIdValue}')", - "expect(callback.body.party.partyIdInfo.partySubIdOrType).to.equal('{$inputs.toSubIdValue}')" + "if (environment.API_TYPE==='fspiop') {", + " expect(callback.body.party.partyIdInfo.partySubIdOrType).to.equal('{$inputs.toSubIdValue}')", + "}" ] }, { @@ -247,8 +250,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}", @@ -378,7 +381,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -539,7 +542,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -585,9 +588,10 @@ "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid.json", "labels": [ + "prod-tests", "p2p" ] } } ] -} +} \ No newline at end of file diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid_error_callback.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid_error_callback.json index 4654c74b..dadec61b 100644 --- a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid_error_callback.json +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid_error_callback.json @@ -163,9 +163,10 @@ "id": 12, "description": "Validate errorInformation", "exec": [ - "expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorCode).to.equal('3200')", - "", - "expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorDescription).to.equal('ID not found')" + "if (environment.API_TYPE === 'fspiop') {", + " expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorCode).to.equal('3200')", + " expect(environment.put_parties_type_id_subid_error.body.errorInformation.errorDescription).to.equal('ID not found')", + "}" ] } ] @@ -199,9 +200,10 @@ "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_subid_error_callback.json", "labels": [ + "prod-tests", "p2p" ] } } ] -} +} \ No newline at end of file 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..e3acca70 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 @@ -10,6 +10,7 @@ "fileInfo": { "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks.json", "labels": [ + "prod-tests", "p2p" ] }, @@ -83,7 +84,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Test PayeeFSP", @@ -345,9 +347,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}", @@ -476,7 +478,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -637,7 +639,7 @@ "description": "Payee Content-Type", "exec": [ "if (environment.ENABLE_WS_ASSERTIONS===true) {", - "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['Content-Type'])", + "expect(environment.payeeRequest.headers['content-type']).to.equal(request.headers['content-type'])", "}" ] }, @@ -1004,4 +1006,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks_ttk.json b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks_ttk.json new file mode 100644 index 00000000..1d0e5bd0 --- /dev/null +++ b/collections/hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks_ttk.json @@ -0,0 +1,870 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "p2p_money_transfer - p2p_happy_path BALANCE CHECKS TTK", + "meta": { + "info": "This is a happy path to test an end to end transfers. It includes party lookup, quote and transfer phases." + }, + "fileInfo": { + "path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path_with_balance_checks_ttk.json", + "labels": [ + "prod-tests", + "p2p", + "min-func-tests" + ] + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to add a new participant to Account Lookup Service." + }, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.toIdType}/{$inputs.ttkpayeefspIdentifier1}", + "method": "post", + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier1}" + }, + "headers": { + "FSPIOP-Source": "{$inputs.ttkpayeefspName}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "body": { + "fspId": "{$inputs.ttkpayeefspName}", + "currency": "{$inputs.currency}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "ignoreCallbacks": false, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": 3, + "meta": { + "info": "This request allows us to get the personal information associated with a MSISDN and the FSP associated to it." + }, + "description": "Get party information", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/parties/{Type}/{ID}", + "method": "get", + "headers": { + "Accept": "{$inputs.acceptParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "Content-Type": "{$inputs.contentTypeParties}" + }, + "params": { + "Type": "{$inputs.toIdType}", + "ID": "{$inputs.ttkpayeefspIdentifier1}" + }, + "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 body should contain party", + "exec": [ + "expect(callback.body).to.have.property('party')" + ] + }, + { + "id": 5, + "description": "Request FSPIOP-Source same as inputs fromFspId", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal('{$inputs.fromFspId}')" + ] + }, + { + "id": 6, + "description": "Callback FSPIOP-Destination same as request FSPIOP-Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be parties", + "exec": [ + "expect(callback.headers['content-type']).to.equal('application/vnd.interoperability.parties+json;version={$inputs.expectedPartiesVersion}')" + ] + } + ] + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "path": "/parties/{$inputs.toIdType}/{$inputs.ttkpayeefspIdentifier1}", + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": 6, + "description": "Get Accounts for Payer BEFORE 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", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payerSettlementBalanceBefore= curAccount.value", + " }", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceBefore= curAccount.value", + " environment.payerReservedPositionBalanceBefore= curAccount.reservedValue", + " }", + " if(curAccount.ledgerAccountType === \"INTERCHANGE_FEE\") {", + " environment.payerInterchFeeBalanceBefore= curAccount.value", + " }", + "})", + "", + "console.log(`environment.payerSettlementBalanceBefore=${environment.payerSettlementBalanceBefore}`);", + "console.log(`environment.payerPositionBalanceBefore=${environment.payerPositionBalanceBefore}`);", + "console.log(`environment.payerReservedPositionBalanceBefore=${environment.payerReservedPositionBalanceBefore}`)", + "console.log(`environment.payerInterchFeeBalanceBefore=${environment.payerInterchFeeBalanceBefore}`);", + "" + ] + } + }, + "disabled": false + }, + { + "id": 7, + "description": "Get Accounts for Payee BEFORE 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/{$prev.3.callback.body.party.partyIdInfo.fspId}/accounts", + "method": "get", + "params": { + "name": "{$prev.3.callback.body.party.partyIdInfo.fspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [] + }, + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency).forEach(curAccount => {", + "", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payeeSettlementBalanceBefore= curAccount.value", + " environment.payeeReservedPositionBalanceBefore= curAccount.reservedValue", + " }", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceBefore= curAccount.value", + " }", + " if(curAccount.ledgerAccountType === \"INTERCHANGE_FEE\") {", + " environment.payeeInterchFeeBalanceBefore= curAccount.value", + " }", + "})", + "", + "console.log(`environment.payeeSettlementBalanceBefore=${environment.payeeSettlementBalanceBefore}`);", + "console.log(`environment.payeePositionBalanceBefore=${environment.payeePositionBalanceBefore}`);", + "console.log(`environment.payeeReservedPositionBalanceBefore=${environment.payeeReservedPositionBalanceBefore}`)", + "console.log(`environment.payeeInterchFeeBalanceBefore=${environment.payeeInterchFeeBalanceBefore}`);", + "" + ] + } + }, + "disabled": false + }, + { + "id": 4, + "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": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$prev.3.callback.body.party.partyIdInfo.fspId}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "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.3.callback.body.party.partyIdInfo.partyIdType}", + "partyIdentifier": "{$prev.3.callback.body.party.partyIdInfo.partyIdentifier}", + "fspId": "{$prev.3.callback.body.party.partyIdInfo.fspId}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "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 transferAmount", + "exec": [ + "expect(callback.body).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount 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={$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')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": 5, + "meta": { + "info": "This request allows us to send a Transfer (payerfsp to payeefsp), resulting in an ILP transfer exchanged between two account holders on either side of a common ledger." + }, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.4.request.body.transactionId}", + "payerFsp": "{$inputs.fromFspId}", + "payeeFsp": "{$prev.3.callback.body.party.partyIdInfo.fspId}", + "amount": { + "amount": "{$inputs.amount}", + "currency": "{$inputs.currency}" + }, + "expiration": "{$prev.4.callback.body.expiration}", + "ilpPacket": "{$prev.4.callback.body.ilpPacket}", + "condition": "{$prev.4.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": "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": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.4.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount currency to match quote request", + "exec": [ + "expect('{$prev.4.callback.body.transferAmount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "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}')" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": 8, + "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.fromFspId}/accounts", + "method": "get", + "params": { + "name": "{$inputs.fromFspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Position Check increase with Transfer Amount", + "exec": [ + "expect(environment.payerPositiontBalanceAfterExpected).to.equal(environment.payerPositionBalanceAfterActual)" + ] + }, + { + "id": 2, + "description": "Settlement Check with no change", + "exec": [ + "expect(requestVariables.payerSettlementBalanceBefore).to.equal(environment.payerSettlementBalanceAfter)", + "" + ] + }, + { + "id": 3, + "description": "Position Reserved Check with no change", + "exec": [ + "expect(requestVariables.payerSettlementBalanceBefore).to.equal(environment.payerSettlementBalanceAfter)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "// lets get retry configs", + "var maxRetryCount = Number.parseFloat(environment.RETRY_MAX_ATTEMPTS) || 20;", + "var maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250;", + "// var maxRetryWait = 1;", + "", + "const envSettlementRuleInterchangeFee = Number.parseFloat(environment.SETTLEMENT_RULE_INTERCHANGE_FEE) || 0.006;", + "", + "const envAmount = Number.parseFloat(environment.amount)", + "", + "var res = response.body;", + "", + "console.log(`environment.payerSettlementBalanceBefore=${environment.payerSettlementBalanceBefore}`);", + "console.log(`environment.payerPositionBalanceBefore=${environment.payerPositionBalanceBefore}`);", + "console.log(`environment.payerInterchFeeBalanceBefore=${environment.payerInterchFeeBalanceBefore}`);", + "", + "for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`);", + "", + " res.filter(account => account.currency === environment.currency).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payerSettlementBalanceAfter= curAccount.value", + " }", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerPositionBalanceAfter= curAccount.value", + " environment.payerReservedPositionBalanceAfter= curAccount.reservedValue", + " }", + "", + " if(curAccount.ledgerAccountType === \"INTERCHANGE_FEE\") {", + " environment.payerInterchFeeBalanceAfterTransfer= curAccount.value", + " }", + " })", + "", + " // TODO: Reference previous POST /Scenarios request (e.g. '{$prev.54.request.body.amount}') once https://github.com/mojaloop/project/issues/2890 (issue 6) has been resolved.", + " const transferAmount = envAmount;", + " ", + " console.log(`transferAmount=${transferAmount}`)", + "", + " // environment.payerSettlementBalanceAfterExpected = (Number.parseFloat(environment.payerSettlementBalanceBefore) + Number.parseFloat(transferAmount));", + "", + " // console.log(`payerSettlementBalanceAfterExpected=${environment.payerSettlementBalanceAfterExpected}`)", + "", + " // environment.payerSettlementBalanceAfterExpected = Number.parseFloat(environment.payerSettlementBalanceAfterExpected).toFixed(2);", + " ", + " // console.log(`payerSettlementBalanceAfterExpected=${environment.payerSettlementBalanceAfterExpected}`)", + "", + " // environment.payerSettlementBalanceAfterActual = Number.parseFloat(environment.payerSettlementBalanceAfter).toFixed(2);", + "", + " // console.log(`payerSettlementBalanceAfterActual=${environment.payerSettlementBalanceAfterActual}`)", + "", + " // console.log(environment.payerSettlementBalanceAfterActual === environment.payerSettlementBalanceAfterExpected)", + "", + " // console.log('extracted payer settlement balance before transfers',environment.payerSettlementBalanceBefore);", + " // console.log('extracted payer settlement balance after transfers ACTUAL',environment.payerSettlementBalanceAfter);", + " // console.log('calculated payer settlement balance before transfers '+environment.payerSettlementBalanceBefore +' transfer amount +'+transferAmount, environment.payerSettlementBalanceAfterExpected);", + "", + " console.log('test fsp1 positions account before',environment.payerPositionBalanceBefore);", + " console.log('test fsp1 positions account after',environment.payerPositionBalanceAfter);", + "", + " environment.payerPositionBalanceAfterActual = Number.parseFloat(environment.payerPositionBalanceAfter).toFixed(2);", + " ", + " console.log(`payerPositionBalanceAfterActual=${environment.payerPositionBalanceAfterActual}`)", + "", + " environment.payerPositiontBalanceAfterExpected = (Number.parseFloat(environment.payerPositionBalanceBefore) + Number.parseFloat(transferAmount)).toFixed(2);", + "", + " console.log(`payerPositiontBalanceAfterExpected=${environment.payerPositiontBalanceAfterExpected}`)", + "", + " // environment.payer_actual_interchange_transfer1 = Number.parseFloat(environment.payerInterchFeeBalanceAfterTransfer1) - Number.parseFloat(environment.payerInterchFeeBalanceBefore)", + " // environment.payer_actual_interchange_transfer1 = Number(environment.payer_actual_interchange_transfer1.toFixed(2));", + " ", + " // environment.payer_expected_interchange_transfer1 = -1 * transferAmount * envSettlementRuleInterchangeFee", + " // console.log(`interchange fee percentage @ ${envSettlementRuleInterchangeFee}`)", + " // console.log(`interchange fee expected ${environment.payer_expected_interchange_transfer1}`);", + "", + " console.log(`environment.payerSettlementBalanceAfter (${environment.payerSettlementBalanceAfter}) == environment.payerSettlementBalanceBefore (${environment.payerSettlementBalanceBefore})`)", + " console.log(`environment.payerPositiontBalanceAfterExpected (${environment.payerPositiontBalanceAfterExpected}) == environment.payerPositionBalanceAfterActual (${environment.payerPositionBalanceAfterActual})`)", + " console.log(`environment.payerInterchFeeBalanceAfterTransfer (${environment.payerInterchFeeBalanceAfterTransfer})`)", + "", + " if ((environment.payerSettlementBalanceAfter == environment.payerSettlementBalanceBefore) && ", + " (environment.payerPositiontBalanceAfterExpected == environment.payerPositionBalanceAfterActual) &&", + " (environment.payerReservedPositionBalanceAfter == environment.payerReservedPositionBalanceBefore) // && ", + " // (environment.payer_actual_interchange_transfer1 == environment.payer_expected_interchange_transfer1)", + " ) {", + " console.log('Everything is ok, lets continue')", + " break; // lets break out of while loop", + " } else {", + " console.log(`Everything is NOT OK, lets wait for ${maxRetryWait}ms, and try again...`)", + " await custom.sleep(maxRetryWait);", + " const axioResponse = await axios.get(`${environment.HOST_CENTRAL_LEDGER}/participants/${environment.fromFspId}/accounts`)", + " res = axioResponse.data;", + " }", + "}", + "", + "// Store *BalanceBefore in a local variable for assertion test", + "requestVariables.payerSettlementBalanceBefore = environment.payerSettlementBalanceBefore", + "requestVariables.payerReservedPositionBalanceBefore = environment.payerReservedPositionBalanceBefore", + "", + "// Reset *Balances for later tests", + "environment.payerPositionBalanceBefore = environment.payerPositionBalanceAfter", + "environment.payerReservedPositionBalanceBefore = environment.payerReservedPositionBalanceAfter", + "environment.payerSettlementBalanceBefore = environment.payerSettlementBalanceAfter", + "environment.payerInterchFeeBalanceBefore = environment.payerInterchFeeBalanceAfterTransfer1", + "", + "console.log(`RESET - environment.payerPositionBalanceBefore=${environment.payerPositionBalanceBefore}`)", + "console.log(`RESET - environment.payerSettlementBalanceBefore=${environment.payerSettlementBalanceBefore}`)", + "console.log(`RESET - environment.payerInterchFeeBalanceBefore=${environment.payerInterchFeeBalanceBefore}`)", + "" + ] + } + }, + "disabled": false + }, + { + "id": 9, + "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/{$prev.3.callback.body.party.partyIdInfo.fspId}/accounts", + "method": "get", + "params": { + "name": "{$prev.3.callback.body.party.partyIdInfo.fspId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Position Check decrease with Transfer Amount", + "exec": [ + "expect(environment.payeePositiontBalanceAfterExpected).to.equal(environment.payeePositionBalanceAfterActual)" + ] + }, + { + "id": 2, + "description": "Settlement Check with no change", + "exec": [ + "expect(requestVariables.payeeSettlementBalanceBefore).to.equal(environment.payeeSettlementBalanceAfter)" + ] + }, + { + "id": 3, + "description": "Position Reserved Check with no change", + "exec": [ + "expect(requestVariables.payeeSettlementBalanceBefore).to.equal(environment.payeeSettlementBalanceAfter)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "// lets get retry configs", + "var maxRetryCount = Number.parseFloat(environment.RETRY_MAX_ATTEMPTS) || 20;", + "var maxRetryWait = Number.parseFloat(environment.RETRY_MAX_WAIT_IN_MS) || 250;", + "// var maxRetryWait = 1;", + "", + "const envSettlementRuleInterchangeFee = Number.parseFloat(environment.SETTLEMENT_RULE_INTERCHANGE_FEE) || 0.006;", + "", + "const envAmount = Number.parseFloat(environment.amount)", + "", + "var res = response.body;", + "", + "console.log(`environment.payeeSettlementBalanceBefore=${environment.payeeSettlementBalanceBefore}`);", + "console.log(`environment.payeePositionBalanceBefore=${environment.payeePositionBalanceBefore}`);", + "console.log(`environment.payeeInterchFeeBalanceBefore=${environment.payeeInterchFeeBalanceBefore}`);", + "", + "for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`);", + "", + " res.filter(account => account.currency === environment.currency).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payeeSettlementBalanceAfter= curAccount.value", + " }", + "", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeePositionBalanceAfter= curAccount.value", + " environment.payeeReservedPositionBalanceAfter= curAccount.reservedValue", + " }", + "", + " if(curAccount.ledgerAccountType === \"INTERCHANGE_FEE\") {", + " environment.payeeInterchFeeBalanceAfterTransfer= curAccount.value", + " }", + " })", + "", + " // TODO: Reference previous POST /Scenarios request (e.g. '{$prev.54.request.body.amount}') once https://github.com/mojaloop/project/issues/2890 (issue 6) has been resolved.", + " const transferAmount = envAmount;", + " ", + " console.log(`transferAmount=${transferAmount}`)", + "", + " // environment.payeeSettlementBalanceAfterExpected = (Number.parseFloat(environment.payeeSettlementBalanceBefore) + Number.parseFloat(transferAmount));", + "", + " // console.log(`payeeSettlementBalanceAfterExpected=${environment.payeeSettlementBalanceAfterExpected}`)", + "", + " // environment.payeeSettlementBalanceAfterExpected = Number.parseFloat(environment.payeeSettlementBalanceAfterExpected).toFixed(2);", + " ", + " // console.log(`payeeSettlementBalanceAfterExpected=${environment.payeeSettlementBalanceAfterExpected}`)", + "", + " // environment.payeeSettlementBalanceAfterActual = Number.parseFloat(environment.payeeSettlementBalanceAfter).toFixed(2);", + "", + " // console.log(`payeeSettlementBalanceAfterActual=${environment.payeeSettlementBalanceAfterActual}`)", + "", + " // console.log(environment.payeeSettlementBalanceAfterActual === environment.payeeSettlementBalanceAfterExpected)", + "", + " // console.log('extracted payee settlement balance before transfers',environment.payeeSettlementBalanceBefore);", + " // console.log('extracted payee settlement balance after transfers ACTUAL',environment.payeeSettlementBalanceAfter);", + " // console.log('calculated payee settlement balance before transfers '+environment.payeeSettlementBalanceBefore +' transfer amount +'+transferAmount, environment.payeeSettlementBalanceAfterExpected);", + "", + " console.log('test fsp1 positions account before',environment.payeePositionBalanceBefore);", + " console.log('test fsp1 positions account after',environment.payeePositionBalanceAfter);", + "", + " environment.payeePositionBalanceAfterActual = Number.parseFloat(environment.payeePositionBalanceAfter).toFixed(2);", + " ", + " console.log(`payeePositionBalanceAfterActual=${environment.payeePositionBalanceAfterActual}`)", + "", + " environment.payeePositiontBalanceAfterExpected = (Number.parseFloat(environment.payeePositionBalanceBefore) - Number.parseFloat(transferAmount)).toFixed(2);", + "", + " console.log(`payeePositiontBalanceAfterExpected=${environment.payeePositiontBalanceAfterExpected}`)", + "", + " // environment.payee_actual_interchange_transfer1 = Number.parseFloat(environment.payeeInterchFeeBalanceAfterTransfer1) - Number.parseFloat(environment.payeeInterchFeeBalanceBefore)", + " // environment.payee_actual_interchange_transfer1 = Number(environment.payee_actual_interchange_transfer1.toFixed(2));", + " ", + " // environment.payee_expected_interchange_transfer1 = -1 * transferAmount * envSettlementRuleInterchangeFee", + " // console.log(`interchange fee percentage @ ${envSettlementRuleInterchangeFee}`)", + " // console.log(`interchange fee expected ${environment.payee_expected_interchange_transfer1}`);", + "", + " console.log(`environment.payeeSettlementBalanceAfter (${environment.payeeSettlementBalanceAfter}) == environment.payeeSettlementBalanceBefore (${environment.payeeSettlementBalanceBefore})`)", + " console.log(`environment.payeePositiontBalanceAfterExpected (${environment.payeePositiontBalanceAfterExpected}) == environment.payeePositionBalanceAfterActual (${environment.payeePositionBalanceAfterActual})`)", + " console.log(`environment.payeeInterchFeeBalanceAfterTransfer (${environment.payeeInterchFeeBalanceAfterTransfer})`)", + "", + " if ((environment.payeeSettlementBalanceAfter == environment.payeeSettlementBalanceBefore) && ", + " (environment.payeePositiontBalanceAfterExpected == environment.payeePositionBalanceAfterActual) &&", + " (environment.payerReservedPositionBalanceAfter == environment.payerReservedPositionBalanceBefore) ", + " // && ", + " // (environment.payee_actual_interchange_transfer1 == environment.payee_expected_interchange_transfer1)", + " ) {", + " console.log('Everything is ok, lets continue')", + " break; // lets break out of while loop", + " } else {", + " console.log(`Everything is NOT OK, lets wait for ${maxRetryWait}ms, and try again...`)", + " await custom.sleep(maxRetryWait);", + " const axioResponse = await axios.get(`${environment.HOST_CENTRAL_LEDGER}/participants/${environment.SIM1_NAME}/accounts`) // TODO: FIX", + " res = axioResponse.data;", + " }", + "}", + "", + "// Store *BalanceBefore in a local variable for assertion test", + "requestVariables.payeeSettlementBalanceBefore = environment.payeeSettlementBalanceAfter", + "requestVariables.payeeReservedPositionBalanceBefore = environment.payeeReservedPositionBalanceBefore", + "", + "// Reset *Balances for later tests", + "environment.payeePositionBalanceBefore = environment.payeePositionBalanceAfter", + "environment.payeeReservedPositionBalanceBefore = environment.payeeReservedPositionBalanceAfter", + "environment.payeeSettlementBalanceBefore = environment.payeeSettlementBalanceAfter", + "environment.payeeInterchFeeBalanceBefore = environment.payeeInterchFeeBalanceAfterTransfer1", + "", + "console.log(`RESET - environment.payeePositionBalanceBefore=${environment.payeePositionBalanceBefore}`)", + "console.log(`RESET - environment.payeeSettlementBalanceBefore=${environment.payeeSettlementBalanceBefore}`)", + "console.log(`RESET - environment.payeeInterchFeeBalanceBefore=${environment.payeeInterchFeeBalanceBefore}`)", + "" + ] + } + }, + "disabled": false + } + ] + } + ] +} \ No newline at end of file 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..fb33ede1 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 @@ -8,7 +8,10 @@ "info": "p2p_money_transfer - payee_request_for_notification_v.1.1" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/patch_notifications/patch_notification.json" + "path": "hub/golden_path/feature_tests/patch_notifications/patch_notification.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -33,8 +36,8 @@ "FSPIOP-Destination": "ttkpayeefsp" }, "body": { - "quoteId": "{$environment.quiteId}", - "transactionId": "{$environment.transfer_ID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -156,9 +159,6 @@ }, "preRequest": { "exec": [ - "const uuid = require('uuid')", - "pm.environment.set('transfer_ID', uuid.v4())", - "pm.environment.set('quiteId', uuid.v4())", "pm.environment.set('patchAmount', '101')" ] } @@ -296,7 +296,6 @@ "id": 15, "description": "Payee Notification transferState to be COMMITTED", "exec": [ - "", "expect(environment.payeeCallbackNotification.body.transferState).to.equal('COMMITTED')" ] }, @@ -338,7 +337,10 @@ "info": "p2p_money_transfer - payee_request_for_notification_v.1.1" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/patch_notifications/patch_notification.json" + "path": "hub/golden_path/feature_tests/patch_notifications/patch_notification.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -363,8 +365,8 @@ "FSPIOP-Destination": "ttkpayeefsp" }, "body": { - "quoteId": "{$environment.quiteId}", - "transactionId": "{$environment.transfer_ID}", + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", "payer": { "partyIdInfo": { "partyIdType": "{$inputs.fromIdType}", @@ -486,9 +488,6 @@ }, "preRequest": { "exec": [ - "const uuid = require('uuid')", - "pm.environment.set('transfer_ID', uuid.v4())", - "pm.environment.set('quiteId', uuid.v4())", "pm.environment.set('patchAmount', '103')", "" ] @@ -569,7 +568,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('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" ] }, { @@ -630,14 +629,6 @@ "", "expect(environment.payeeCallbackNotification.body.transferState).to.equal('ABORTED')" ] - }, - { - "id": 16, - "description": "Payee Notification extension cause contains 'invalid fulfilment'", - "exec": [ - "expect(environment.payeeCallbackNotification.body.extensionList.extension[0].value).contains('invalid fulfilment')", - "" - ] } ] }, 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..ecafa400 100644 --- a/collections/hub/golden_path/feature_tests/post_scenarios/positive.json +++ b/collections/hub/golden_path/feature_tests/post_scenarios/positive.json @@ -8,7 +8,10 @@ "info": "Positive Scenarios" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/post_scenarios/positive.json" + "path": "hub/golden_path/feature_tests/post_scenarios/positive.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -86,7 +89,8 @@ "url": "{$inputs.PAYEEFSP_BACKEND_TESTAPI_URL}", "headers": { "FSPIOP-Source": "{$inputs.toFspId}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Content-Type": "application/json" }, "body": { "displayName": "Test PayeeFSP", @@ -330,21 +334,27 @@ "id": 8, "description": "Payee First Name matches", "exec": [ - "expect(response.body.scenario1.result.to.firstName).to.equal(requestVariables.expectedPayeeFirstName)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario1.result.to.firstName).to.equal(requestVariables.expectedPayeeFirstName)", + "}" ] }, { "id": 9, "description": "Payee Last Name matches", "exec": [ - "expect(response.body.scenario1.result.to.lastName).to.equal(requestVariables.expectedPayeeLastName)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario1.result.to.lastName).to.equal(requestVariables.expectedPayeeLastName)", + "}" ] }, { "id": 10, "description": "Payee DOB matches", "exec": [ - "expect(response.body.scenario1.result.to.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario1.result.to.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)", + "}" ] }, { @@ -463,14 +473,18 @@ "id": 27, "description": "Payee commission amount is zero (0)", "exec": [ - "expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')", + "}" ] }, { "id": 28, "description": "Payee FSP commission currency matches", "exec": [ - "expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)", + "}" ] }, { @@ -519,21 +533,27 @@ "id": 35, "description": "Payee First Name matches", "exec": [ - "expect(response.body.scenario2.result.to.firstName).to.equal(requestVariables.expectedPayeeFirstName)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.to.firstName).to.equal(requestVariables.expectedPayeeFirstName)", + "}" ] }, { "id": 36, "description": "Payee Last Name matches", "exec": [ - "expect(response.body.scenario2.result.to.lastName).to.equal(requestVariables.expectedPayeeLastName)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.to.lastName).to.equal(requestVariables.expectedPayeeLastName)", + "}" ] }, { "id": 37, "description": "Payee DOB matches", "exec": [ - "expect(response.body.scenario2.result.to.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.to.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)", + "}" ] }, { @@ -638,14 +658,18 @@ "id": 52, "description": "Payee FSP commission is zero (0)", "exec": [ - "expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')", + "}" ] }, { "id": 53, "description": "Transfer currency matches", "exec": [ - "expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)" + "if(environment.API_TYPE === 'fspiop') {", + " expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)", + "}" ] }, { @@ -687,24 +711,6 @@ "}" ] }, - { - "id": 59, - "description": "Payee Request: Content-Type is 'application/vnd.interoperability.parties+json;version=1.0'", - "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", @@ -799,7 +805,7 @@ "id": 71, "description": "Payer Callback: Payee first name matches", "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.complexName.firstName).to.equal(requestVariables.expectedPayeeFirstName)", "}" ] @@ -808,7 +814,7 @@ "id": 72, "description": "Payer Callback: Payee last name matches", "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.complexName.lastName).to.equal(requestVariables.expectedPayeeLastName)", "}" ] @@ -817,7 +823,7 @@ "id": 73, "description": "Payer Callback: Payee DOB matches", "exec": [ - "if (environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)", "}" ] @@ -849,15 +855,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", @@ -941,7 +938,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..cf1315f9 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 @@ -8,7 +8,10 @@ "info": "Reserve Notification Positive - Testfsp1 Testfsp2" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json" + "path": "hub/golden_path/feature_tests/post_scenarios/reserve_notification_positive_testfsp1_testfsp2.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -28,7 +31,9 @@ "path": "/repository/parties", "method": "post", "url": "{$inputs.TESTFSP1_BACKEND_TESTAPI_URL}", - "headers": {}, + "headers": { + "Content-Type": "application/json" + }, "body": { "displayName": "{$requestVariables.fullName}", "firstName": "{$requestVariables.firstName}", @@ -86,7 +91,9 @@ "path": "/repository/parties", "method": "post", "url": "{$inputs.TESTFSP2_BACKEND_TESTAPI_URL}", - "headers": {}, + "headers": { + "Content-Type": "application/json" + }, "body": { "displayName": "{$requestVariables.fullName}", "firstName": "{$requestVariables.firstName}", @@ -144,7 +151,9 @@ "path": "/repository/parties", "method": "post", "url": "{$inputs.TESTFSP1_BACKEND_TESTAPI_URL}", - "headers": {}, + "headers": { + "Content-Type": "application/json" + }, "body": { "displayName": "PayeeFirst PayeeLast", "firstName": "PayeeFirst", @@ -195,6 +204,9 @@ "path": "/scenarios", "method": "post", "url": "{$inputs.TESTFSP2_BACKEND_TESTAPI_URL}", + "headers": { + "Content-Type": "application/json" + }, "ignoreCallbacks": true, "body": [ { @@ -299,7 +311,7 @@ "id": 8, "description": "Payee First name \"Testfsp1First\"", "exec": [ - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario1.result.to.firstName).to.equal('Testfsp1First')", "}" ] @@ -308,7 +320,7 @@ "id": 9, "description": "Payee Last name \"Testfsp1Last\"", "exec": [ - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario1.result.to.lastName).to.equal('Testfsp1Last')", "}" ] @@ -317,7 +329,7 @@ "id": 10, "description": "Payee DOB matches", "exec": [ - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario1.result.to.dateOfBirth).to.equal('2010-10-10')", "}" ] @@ -470,7 +482,7 @@ "id": 57, "description": "Payee FSP commission amount is '0'", "exec": [ - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')", "}" ] @@ -479,7 +491,7 @@ "id": 56, "description": "Payee FSP commission currency matches", "exec": [ - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario1.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)", "}" ] @@ -548,7 +560,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario2.result.to.firstName).to.equal('Testfsp1First')", "}" ] @@ -559,7 +571,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario2.result.to.lastName).to.equal('Testfsp1Last')", "}" ] @@ -570,7 +582,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario2.result.to.dateOfBirth).to.equal('2010-10-10')", "}" ] @@ -746,7 +758,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.amount).to.equal('0')", "}" ] @@ -757,7 +769,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS) {", + "if (environment.TEST_NOTIFICATIONS && environment.API_TYPE === 'fspiop') {", " expect(response.body.scenario2.result.quoteResponse.body.payeeFspCommission.currency).to.equal(environment.SIMPAYEE_CURRENCY)", "}" ] @@ -808,7 +820,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": [ "", "", @@ -817,17 +829,6 @@ "}" ] }, - { - "id": 60, - "description": "On Payee FSP 'accept' header should be 'application/vnd.interoperability.parties+json;version=1.1'", - "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", @@ -863,7 +864,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": [ "", "", @@ -968,7 +969,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.complexName.firstName).to.equal('Testfsp1First')", "}" ] @@ -979,7 +980,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.complexName.lastName).to.equal('Testfsp1Last')", "}" ] @@ -990,7 +991,7 @@ "exec": [ "", "", - "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true) {", + "if (environment.TEST_NOTIFICATIONS && environment.ENABLE_WS_ASSERTIONS===true && environment.API_TYPE === 'fspiop') {", " expect(requestVariables.payerCallback.data.party.personalInfo.dateOfBirth).to.equal(requestVariables.expectedPayeeDOB)", "}" ] @@ -1071,11 +1072,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/fulfil-reserved-v1.0.json b/collections/hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json index 0d326062..78916273 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 @@ -9,7 +9,10 @@ "info": "Fulfil Reserved 1.0" }, "fileInfo": { - "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json" + "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/fulfil-reserved-v1.0.json", + "labels": [ + "prod-tests" + ] }, "requests": [ { @@ -37,8 +40,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,15 +549,13 @@ "description": "Callback Body - error cause in extensionList", "exec": [ "", - "expect(requestVariables.transferCallback.body).to.have.property('extensionList')", - "expect(requestVariables.transferCallback.body.extensionList).to.have.property('extension')", - "", - "const filteredExtensionListForCause = requestVariables.transferCallback.body.extensionList.extension.filter(ext => ext.key === \"cause\")", - "", - "expect(filteredExtensionListForCause.length).to.equal(1)", - "", - "expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")", - "", + "if (environment.API_TYPE === 'fspiop') {", + " expect(requestVariables.transferCallback.body).to.have.property('extensionList')", + " expect(requestVariables.transferCallback.body.extensionList).to.have.property('extension')", + " const filteredExtensionListForCause = requestVariables.transferCallback.body.extensionList.extension.filter(ext => ext.key === \"cause\")", + " expect(filteredExtensionListForCause.length).to.equal(1)", + " expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")", + "}", "" ] } @@ -584,14 +585,14 @@ " let _callback = callback", "", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.transferResponse = _response", + " requestVariables.transferCallback = _callback", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _callback?.body?.transferState === expectedTransferState;", " ", " if (isOk) {", " console.log(`Everything is OK, let's continue`)", - " requestVariables.transferResponse = _response", - " requestVariables.transferCallback = _callback", " break;", " } else {", " console.log(`Everything is NOT OK, let's wait for ${maxRetryWait}ms, and try again...`)", 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..d1d9bed9 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": { @@ -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}')", "" @@ -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++) {", + " response = _response ", + " 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`)", + " 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": { @@ -603,7 +647,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json" + "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_abort_v1.1.json", + "labels": [ + "prod-tests" + ] } } ] 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..0833900c 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}", @@ -526,8 +526,9 @@ "id": 20, "description": "Callback Body - Extension List value is 3100: Generic validation error - invalid fulfilment", "exec": [ - "expect(callback.body.extensionList.extension[0].value).to.equal('3100: Generic validation error - invalid fulfilment')", - "" + "if (environment.API_TYPE === 'fspiop') {", + " expect(callback.body.extensionList.extension[0].value).to.equal('3100: Generic validation error - invalid fulfilment')", + "}" ] } ] @@ -645,7 +646,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json" + "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_fulfillment.json", + "labels": [ + "prod-tests" + ] } } ] 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..dac5c69d 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 @@ -21,10 +21,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/positions", - "path": "/participants/{$inputs.SIMPAYER_NAME}/positions", + "path": "/participants/{$inputs.fromFspId}/positions", "method": "get", "params": { - "name": "{$inputs.SIMPAYER_NAME}" + "name": "{$inputs.fromFspId}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "tests": { @@ -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}", @@ -315,27 +315,11 @@ "exec": [ "expect(response.statusText).to.equal('Accepted')" ] - }, - { - "id": 3, - "description": "Callback Body - errorCode is 3303", - "exec": [ - "expect(callback.body.errorInformation.errorCode).to.equal('3303')", - "" - ] - }, - { - "id": 4, - "description": "Callback Body - errorDescription is Transfer expired", - "exec": [ - "expect(callback.body.errorInformation.errorDescription).to.equal('Transfer expired')", - "" - ] } ] }, "url": "{$inputs.HOST_ML_API_ADAPTER}", - "ignoreCallbacks": false, + "ignoreCallbacks": true, "scriptingEngine": "javascript", "scripts": { "preRequest": { @@ -402,7 +386,15 @@ "preRequest": { "exec": [ "requestVariables.completedTimestamp = new Date(new Date().getTime() + 10000).toISOString()", - "" + "", + "await inboundEvent.addListener('payerCallback', 'put', '/transfers/{$prev.5.request.body.transferId}/error', (headers, body) => {", + " return headers['fspiop-destination'] === '{$inputs.fromFspId}'", + "})" + ] + }, + "postRequest": { + "exec": [ + "requestVariables.payeePostTransfer = await inboundEvent.getMessage('payerCallback', 15000)" ] } } @@ -508,8 +500,17 @@ }, { "id": 19, + "description": "Callback Body - transferState is ABORTED", + "exec": [ + "expect(callback.body.transferState).to.equal('ABORTED')", + "" + ] + }, + { + "id": 20, "description": "Callback Body - error cause in extensionList", "exec": [ + "if (environment.API_TYPE === 'fspiop') {", "expect(callback.body).to.have.property('extensionList')", "expect(callback.body.extensionList).to.have.property('extension')", "", @@ -517,7 +518,8 @@ "", "expect(filteredExtensionListForCause.length).to.equal(1)", "", - "expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")" + "expect(filteredExtensionListForCause[0].value).to.equal(\"3303: Transfer expired\")", + "}" ] } ] @@ -590,10 +592,10 @@ "type": "central_admin" }, "operationPath": "/participants/{name}/positions", - "path": "/participants/{$inputs.SIMPAYER_NAME}/positions", + "path": "/participants/{$inputs.fromFspId}/positions", "method": "get", "params": { - "name": "{$inputs.SIMPAYER_NAME}" + "name": "{$inputs.fromFspId}" }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "tests": { @@ -635,7 +637,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json" + "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payee_invalid_timestamp.json", + "labels": [ + "prod-tests" + ] } } ] 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..f64b9072 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,11 +123,11 @@ "FSPIOP-Destination": "{$inputs.NORESPONSE_SIMPAYEE_NAME}" }, "body": { - "transferId": "{$function.generic.generateUUID}", + "transferId": "{$function.generic.generateID}", "payerFsp": "{$inputs.fromFspId}", "payeeFsp": "{$inputs.NORESPONSE_SIMPAYEE_NAME}", "amount": { - "amount": "105.11", + "amount": "105", "currency": "{$inputs.currency}" }, "expiration": "{$requestVariables.transferExpiration}", @@ -228,9 +228,9 @@ }, "postRequest": { "exec": [ - "requestVariables.payerCallback = await inboundEvent.getMessage('payerCallback')", + "requestVariables.payerCallback = await inboundEvent.getMessage('payerCallback', 15000)", "console.log(requestVariables.payerCallback)", - "requestVariables.payeeCallback = await inboundEvent.getMessage('payeeCallback')", + "requestVariables.payeeCallback = await inboundEvent.getMessage('payeeCallback', 15000)", "console.log(requestVariables.payeeCallback)" ] } @@ -352,7 +352,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json" + "path": "hub/golden_path/feature_tests/transfer_negative_scenarios/payer_transfer_timeout.json", + "labels": [ + "prod-tests" + ] } } ] 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..a1c8cac6 --- /dev/null +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_quotes.json @@ -0,0 +1,190 @@ +{ + "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": [ + "prod-tests", + "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.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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..b78a816a --- /dev/null +++ b/collections/hub/golden_path/fx/api_schema_validation/fx_transfers.json @@ -0,0 +1,274 @@ +{ + "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": [ + "prod-tests", + "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.generateID}", + "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.generateID}", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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/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 new file mode 100644 index 00000000..3ce39cc3 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json @@ -0,0 +1,719 @@ +{ + "options": {}, + "name": "hub_golden_path_fx_feature_tests_duplicate_handling_duplicate_fx_transfers", + "test_cases": [ + { + "id": 1, + "name": "Duplicate fxTransfer", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/duplicate_handling/duplicate_fx_transfers.json", + "labels": [ + "prod-tests", + "fx" + ] + }, + "meta": { + "info": "FX Transfer" + }, + "breakOnError": false, + "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.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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 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}')" + ] + } + ] + }, + "params": { + "Type": "", + "ID": "" + } + }, + { + "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": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "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": "{$inputs.toIdType}", + "partyIdentifier": "{$inputs.FX_MSISDN_1}", + "fspId": "{$inputs.FX_PAYEE_DFSP_ID}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.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": 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.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, + "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": "SEND", + "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')" + ] + } + ] + }, + "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": 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": 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}')" + ] + } + ] + }, + "params": { + "name": "" + }, + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.expiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ] + } + } + }, + { + "id": 13, + "description": "Duplicate POST /fxTransfers with modified 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": "{$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')" + ] + }, + { + "id": 4, + "description": "Got errorInformation", + "exec": [ + "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": 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')" + ] + }, + { + "id": 4, + "description": "Should get fulfilment same", + "exec": [ + "expect(callback.body.fulfilment).to.equal('{$prev.9.callback.body.fulfilment}')" + ] + } + ] + }, + "params": { + "name": "" + }, + "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/feature_tests/happy_path/fx_tests.json b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json new file mode 100644 index 00000000..820673ee --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/happy_path/fx_tests.json @@ -0,0 +1,1094 @@ +{ + "options": {}, + "name": "hub_golden_path_fx_feature_tests_happy_path_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "Happy Path FX E2E", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/happy_path/fx_tests.json", + "labels": [ + "prod-tests", + "fx", + "min-func-tests" + ] + }, + "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.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": 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": "{$function.generic.generateID}", + "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 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}')" + ] + } + ] + } + }, + { + "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": "{$prev.4.request.body.conversionTerms.determiningTransferId}", + "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": "SEND", + "amount": { + "amount": "{$prev.4.callback.body.conversionTerms.targetAmount.amount}", + "currency": "{$prev.4.callback.body.conversionTerms.targetAmount.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": 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.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": "SEND", + "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.FX_SOURCE_AMOUNT)" + ] + }, + { + "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.FX_SOURCE_AMOUNT)" + ] + }, + { + "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 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..b821714b --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/master.json @@ -0,0 +1,19 @@ +{ + "order": [ + { + "name": "happy_path", + "type": "folder", + "labels": [ + "min-func-tests" + ] + }, + { + "name": "duplicate_handling", + "type": "folder" + }, + { + "name": "negative_scenarios", + "type": "folder" + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..d910f627 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json @@ -0,0 +1,813 @@ +{ + "options": {}, + "name": "hub_golden_path_fx_feature_tests_negative_scenarios_fxp_error", + "test_cases": [ + { + "id": 1, + "name": "FX Quote - Error scenario", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json", + "labels": [ + "prod-tests", + "fx" + ] + }, + "meta": { + "info": "POST /fxQuotes returns PUT /fxQuotes/{ID}/error" + }, + "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.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT_ERROR_GENERIC}" + }, + "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 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')" + ] + } + ] + }, + "params": { + "Type": "", + "ID": "" + } + } + ] + }, + { + "id": 2, + "name": "FX Transfer - Error Scenario", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/negative_scenarios/fxp_error.json", + "labels": [ + "prod-tests", + "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": 2, + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "initiatingFsp": "{$inputs.FX_PAYER_DFSP_ID}", + "counterPartyFsp": "{$inputs.FX_TESTFXP1_ID}", + "amountType": "SEND", + "sourceAmount": { + "currency": "{$inputs.FX_SOURCE_CURRENCY}", + "amount": "{$inputs.FX_SOURCE_AMOUNT_ERROR_GENERIC}" + }, + "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']}')" + ] + }, + { + "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')" + ] + } + ] + }, + "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": 1, + "description": "Payer position should not be changed", + "exec": [ + "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": [ + "prod-tests", + "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_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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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']}')" + ] + } + ] + }, + "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": 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, + "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/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..25485b20 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/fxp_invalid_fulfillment.json @@ -0,0 +1,498 @@ +{ + "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": [ + "prod-tests", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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..de4518aa --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/payee_invalid_fulfillment.json @@ -0,0 +1,498 @@ +{ + "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": [ + "prod-tests", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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..c0a9bff7 --- /dev/null +++ b/collections/hub/golden_path/fx/feature_tests/negative_scenarios/timeout_scenarios.json @@ -0,0 +1,656 @@ +{ + "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": [ + "prod-tests", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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": [ + "prod-tests", + "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.generateID}", + "determiningTransferId": "{$function.generic.generateID}", + "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/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..b1979453 100644 --- a/collections/hub/golden_path/master.json +++ b/collections/hub/golden_path/master.json @@ -2,43 +2,61 @@ "order": [ { "name": "feature_tests", - "type": "folder" + "type": "folder", + "labels": [ + "prod-tests" + ] }, { "name": "bug fixes", - "type": "folder" + "type": "folder", + "labels": [ + "prod-tests" + ] }, { "name": "p2p_on_us_transfers", - "type": "folder" + "type": "folder", + "labels": [ + "prod-tests" + ] }, { "name": "quoting_service", "type": "folder", "labels": [ - "quotes" + "quotes", + "prod-tests" ] }, { "name": "transaction_request_service", - "type": "folder" + "type": "folder", + "labels": [ + "prod-tests" + ] }, { "name": "settlement_management", "type": "folder", "labels": [ - "settlements" + "settlements", + "prod-tests" ] }, { "name": "api-tests", - "type": "folder" + "type": "folder", + "labels": [ + "prod-tests" + ] }, { - "name": "settlement_cgs", + "name": "fx", "type": "folder", "labels": [ - "settlements" + "fx", + "prod-tests" ] } ] 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..e481e1ce 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}", @@ -361,7 +361,6 @@ " ", " //expect(environment.callbackt.data).to.have.property(\"errorInformation\");", " expect(environment.callbackt.data.errorInformation.errorCode).to.equal(\"3100\");", - " expect(environment.callbackt.data.errorInformation.errorDescription).to.equal(\"Generic validation error - Payer FSP and Payee FSP should be different, unless on-us tranfers are allowed by the Scheme\")", "}" ] }, @@ -473,7 +472,7 @@ "fileInfo": { "path": "hub/golden_path/p2p_on_us_transfers/p2p_money_transfer_on_us.json", "labels": [ - "p2p" + "prod-tests" ] } } diff --git a/collections/hub/golden_path/quoting_service/quoting_service.json b/collections/hub/golden_path/quoting_service/quoting_service.json index d21fa90f..fba9b4e9 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}", @@ -381,9 +381,9 @@ }, { "id": 3, - "description": "Check Error code 3102", + "description": "Check Error code 3101", "exec": [ - "expect(response.body.errorInformation.errorCode).to.equal('3102')" + "expect(response.body.errorInformation.errorCode).to.equal('3101')" ] }, { @@ -395,9 +395,9 @@ }, { "id": 5, - "description": "Missing mandatory element error", + "description": "Invalid date error", "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('Missing mandatory element ');" + "expect(response.body.errorInformation.errorDescription).to.include('Malformed syntax - Invalid date header');" ] } ] @@ -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}", @@ -578,6 +578,16 @@ ] } ] + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "if(environment.API_TYPE != 'fspiop') {", + " custom.skipRequest()", + "}" + ] + } } }, { @@ -638,9 +648,10 @@ "fileInfo": { "path": "hub/golden_path/quoting_service/quoting_service.json", "labels": [ + "prod-tests", "quotes" ] } } ] -} +} \ No newline at end of file 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..18521d77 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 @@ -5,7 +5,8 @@ "id": 1, "name": "Pre-settlement account activation per participant for $currency", "meta": { - "info": "Pre-settlement account activation per participant for $currency" + "info": "Pre-settlement account activation per participant for $currency", + "executionOrder": 3010 }, "requests": [ { @@ -404,6 +405,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -412,7 +414,8 @@ "id": 2, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 3020 }, "requests": [ { @@ -1175,6 +1178,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1183,7 +1187,8 @@ "id": 3, "name": "Store settlement and position balances before", "meta": { - "info": "Store settlement and position balances before" + "info": "Store settlement and position balances before", + "executionOrder": 3030 }, "requests": [ { @@ -1510,6 +1515,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1518,7 +1524,8 @@ "id": 4, "name": "Send transfer in $currency from SIM1 to SIM2", "meta": { - "info": "Send transfer in $currency from SIM1 to SIM2" + "info": "Send transfer in $currency from SIM1 to SIM2", + "executionOrder": 3044 }, "requests": [ { @@ -1544,8 +1551,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}", @@ -1822,6 +1829,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1830,7 +1838,8 @@ "id": 5, "name": "Send transfer in $currency from SIM1 to PAYEEFSP", "meta": { - "info": "Send transfer in $currency from SIM1 to PAYEEFSP" + "info": "Send transfer in $currency from SIM1 to PAYEEFSP", + "executionOrder": 3044 }, "requests": [ { @@ -1856,8 +1865,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}", @@ -2130,6 +2139,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2138,7 +2148,8 @@ "id": 6, "name": "Send transfer in $currency from PAYERFSP to SIM1", "meta": { - "info": "Send transfer in $currency from PAYERFSP to SIM1" + "info": "Send transfer in $currency from PAYERFSP to SIM1", + "executionOrder": 3044 }, "requests": [ { @@ -2164,8 +2175,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}", @@ -2438,6 +2449,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2446,7 +2458,8 @@ "id": 7, "name": "Send transfer in $currency from SIM2 to PAYERFSP", "meta": { - "info": "Send transfer in $currency from SIM2 to PAYERFSP" + "info": "Send transfer in $currency from SIM2 to PAYERFSP", + "executionOrder": 3044 }, "requests": [ { @@ -2472,8 +2485,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}", @@ -2603,19 +2616,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 +2746,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)", + "}", + "" ] } } @@ -2755,6 +2770,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2763,7 +2779,8 @@ "id": 8, "name": "Send transfer in $currency from PAYEEFSP to SIM2", "meta": { - "info": "Send transfer in $currency from PAYEEFSP to SIM2" + "info": "Send transfer in $currency from PAYEEFSP to SIM2", + "executionOrder": 3044 }, "requests": [ { @@ -2789,8 +2806,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}", @@ -3063,6 +3080,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3071,7 +3089,8 @@ "id": 9, "name": "Send transfer in $currency from PAYEEFSP to PAYERFSP", "meta": { - "info": "Send transfer in $currency from PAYEEFSP to PAYERFSP" + "info": "Send transfer in $currency from PAYEEFSP to PAYERFSP", + "executionOrder": 3044 }, "requests": [ { @@ -3097,8 +3116,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}", @@ -3371,6 +3390,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3379,7 +3399,8 @@ "id": 10, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 3100 }, "requests": [ { @@ -3616,6 +3637,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3624,7 +3646,8 @@ "id": 11, "name": "Store Settlement&Position Account Balances After Transfers", "meta": { - "info": "Store Settlement&Position Account Balances After Transfers" + "info": "Store Settlement&Position Account Balances After Transfers", + "executionOrder": 3110 }, "requests": [ { @@ -3847,6 +3870,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3855,7 +3879,8 @@ "id": 12, "name": "Prepare-settlement", "meta": { - "info": "Prepare-settlement" + "info": "Prepare-settlement", + "executionOrder": 3120 }, "requests": [ { @@ -4052,6 +4077,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4060,7 +4086,8 @@ "id": 13, "name": "Store Settlement&Position Account Balances After Prepare", "meta": { - "info": "Store Settlement&Position Account Balances After Prepare" + "info": "Store Settlement&Position Account Balances After Prepare", + "executionOrder": 3130 }, "requests": [ { @@ -4339,6 +4366,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4347,7 +4375,8 @@ "id": 14, "name": "reserve-settlement", "meta": { - "info": "reserve-settlement" + "info": "reserve-settlement", + "executionOrder": 3140 }, "requests": [ { @@ -4544,6 +4573,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4552,7 +4582,8 @@ "id": 15, "name": "Store Settlement&Position Account Balances After Reserve", "meta": { - "info": "Store Settlement&Position Account Balances After Reserve" + "info": "Store Settlement&Position Account Balances After Reserve", + "executionOrder": 3150 }, "requests": [ { @@ -4831,6 +4862,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4839,7 +4871,8 @@ "id": 16, "name": "commit-settlement", "meta": { - "info": "commit-settlement" + "info": "commit-settlement", + "executionOrder": 3160 }, "requests": [ { @@ -5036,6 +5069,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5044,7 +5078,8 @@ "id": 17, "name": "Store Settlement&Position Account Balances After commit", "meta": { - "info": "Store Settlement&Position Account Balances After commit" + "info": "Store Settlement&Position Account Balances After commit", + "executionOrder": 3170 }, "requests": [ { @@ -5395,6 +5430,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5403,7 +5439,8 @@ "id": 18, "name": "settle-settlement", "meta": { - "info": "settle-settlement" + "info": "settle-settlement", + "executionOrder": 3180 }, "requests": [ { @@ -5600,6 +5637,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5608,7 +5646,8 @@ "id": 19, "name": "Store Settlement&Position Account Balances After Settle", "meta": { - "info": "Store Settlement&Position Account Balances After Settle" + "info": "Store Settlement&Position Account Balances After Settle", + "executionOrder": 3190 }, "requests": [ { @@ -5887,9 +5926,10 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } } ] -} \ No newline at end of file +} 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..5e5549f0 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 @@ -5,7 +5,8 @@ "id": 1, "name": "Pre-settlement account activation per participant for $currency2", "meta": { - "info": "Pre-settlement account activation per participant for $currency2" + "info": "Pre-settlement account activation per participant for $currency2", + "executionOrder": 4010 }, "requests": [ { @@ -404,6 +405,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -412,7 +414,8 @@ "id": 2, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 4020 }, "requests": [ { @@ -1175,6 +1178,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1183,7 +1187,8 @@ "id": 3, "name": "Store settlement and position balances before", "meta": { - "info": "Store settlement and position balances before" + "info": "Store settlement and position balances before", + "executionOrder": 4030 }, "requests": [ { @@ -1510,6 +1515,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1518,7 +1524,8 @@ "id": 4, "name": "Send transfer from SIM1 to SIM2 in $currency2", "meta": { - "info": "Send transfer from SIM1 to SIM2 in $currency2" + "info": "Send transfer from SIM1 to SIM2 in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -1544,8 +1551,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}", @@ -1822,6 +1829,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1830,7 +1838,8 @@ "id": 5, "name": "Send transfer from SIM1 to PAYEEFSP in $currency2", "meta": { - "info": "Send transfer from SIM1 to PAYEEFSP in $currency2" + "info": "Send transfer from SIM1 to PAYEEFSP in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -1856,8 +1865,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}", @@ -2130,6 +2139,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2138,7 +2148,8 @@ "id": 6, "name": "Send transfer from PAYERFSP to SIM1 in $currency2", "meta": { - "info": "Send transfer from PAYERFSP to SIM1 in $currency2" + "info": "Send transfer from PAYERFSP to SIM1 in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -2164,8 +2175,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}", @@ -2438,6 +2449,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2446,7 +2458,8 @@ "id": 7, "name": "Send transfer from SIM2 to PAYERFSP in $currency2", "meta": { - "info": "Send transfer from SIM2 to PAYERFSP in $currency2" + "info": "Send transfer from SIM2 to PAYERFSP in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -2472,8 +2485,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}", @@ -2601,19 +2614,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);", @@ -2755,6 +2768,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2763,7 +2777,8 @@ "id": 8, "name": "Send transfer from PAYEEFSP to SIM2 in $currency2", "meta": { - "info": "Send transfer from PAYEEFSP to SIM2 in $currency2" + "info": "Send transfer from PAYEEFSP to SIM2 in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -2789,8 +2804,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}", @@ -2934,7 +2949,8 @@ "console.log(environment.transactionid);*/" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3057,12 +3073,14 @@ "console.log(environment.payeefspcallbackst);" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3071,7 +3089,8 @@ "id": 9, "name": "Send transfer from PAYEEFSP to PAYERFSP in $currency2", "meta": { - "info": "Send transfer from PAYEEFSP to PAYERFSP in $currency2" + "info": "Send transfer from PAYEEFSP to PAYERFSP in $currency2", + "executionOrder": 4044 }, "requests": [ { @@ -3097,8 +3116,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}", @@ -3242,7 +3261,8 @@ "console.log(environment.transactionid);*/" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3365,12 +3385,14 @@ "console.log(environment.payeefspcallbackst);" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3379,7 +3401,8 @@ "id": 10, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 4100 }, "requests": [ { @@ -3436,7 +3459,8 @@ "console.log(environment.openWindowID);" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3519,7 +3543,8 @@ "//}" ] } - } + }, + "disabled": false }, { "id": 3, @@ -3610,12 +3635,14 @@ "*/" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3624,7 +3651,8 @@ "id": 11, "name": "Store Settlement&Position Account Balances After Transfers", "meta": { - "info": "Store Settlement&Position Account Balances After Transfers" + "info": "Store Settlement&Position Account Balances After Transfers", + "executionOrder": 4110 }, "requests": [ { @@ -3679,7 +3707,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -3733,7 +3762,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -3787,7 +3817,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -3841,12 +3872,14 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3855,7 +3888,8 @@ "id": 12, "name": "Prepare-settlement", "meta": { - "info": "Prepare-settlement" + "info": "Prepare-settlement", + "executionOrder": 4120 }, "requests": [ { @@ -3957,7 +3991,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -4046,12 +4081,14 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4060,7 +4097,8 @@ "id": 13, "name": "Store Settlement&Position Account Balances After Prepare", "meta": { - "info": "Store Settlement&Position Account Balances After Prepare" + "info": "Store Settlement&Position Account Balances After Prepare", + "executionOrder": 4130 }, "requests": [ { @@ -4129,7 +4167,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -4197,7 +4236,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -4265,7 +4305,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -4333,12 +4374,14 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4347,7 +4390,8 @@ "id": 14, "name": "reserve-settlement", "meta": { - "info": "reserve-settlement" + "info": "reserve-settlement", + "executionOrder": 4140 }, "requests": [ { @@ -4449,7 +4493,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -4538,12 +4583,14 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4552,7 +4599,8 @@ "id": 15, "name": "Store Settlement&Position Account Balances After Reserve", "meta": { - "info": "Store Settlement&Position Account Balances After Reserve" + "info": "Store Settlement&Position Account Balances After Reserve", + "executionOrder": 4150 }, "requests": [ { @@ -4621,7 +4669,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -4689,7 +4738,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -4757,7 +4807,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -4825,12 +4876,14 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4839,7 +4892,8 @@ "id": 16, "name": "commit-settlement", "meta": { - "info": "commit-settlement" + "info": "commit-settlement", + "executionOrder": 4160 }, "requests": [ { @@ -4941,7 +4995,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5030,12 +5085,14 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5044,7 +5101,8 @@ "id": 17, "name": "Store Settlement&Position Account Balances After commit", "meta": { - "info": "Store Settlement&Position Account Balances After commit" + "info": "Store Settlement&Position Account Balances After commit", + "executionOrder": 4170 }, "requests": [ { @@ -5113,7 +5171,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -5181,7 +5240,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -5249,7 +5309,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -5317,7 +5378,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5389,12 +5451,14 @@ "environment.hubMultilateralAccountBalanceAfterCommit = hubMultilateralAccountBalanceAfterCommit;" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5403,7 +5467,8 @@ "id": 18, "name": "settle-settlement", "meta": { - "info": "settle-settlement" + "info": "settle-settlement", + "executionOrder": 4180 }, "requests": [ { @@ -5505,7 +5570,8 @@ "" ] } - } + }, + "disabled": false }, { "id": 5, @@ -5594,12 +5660,14 @@ "environment.controlvar = isok;" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5608,7 +5676,8 @@ "id": 19, "name": "Store Settlement&Position Account Balances After Settle", "meta": { - "info": "Store Settlement&Position Account Balances After Settle" + "info": "Store Settlement&Position Account Balances After Settle", + "executionOrder": 4190 }, "requests": [ { @@ -5677,7 +5746,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 2, @@ -5745,7 +5815,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 3, @@ -5813,7 +5884,8 @@ "})" ] } - } + }, + "disabled": false }, { "id": 4, @@ -5881,15 +5953,17 @@ "})" ] } - } + }, + "disabled": false } ], "fileInfo": { "path": "hub/golden_path/settlement_management/Settlement-management-second-currency-test.json", "labels": [ + "prod-tests", "settlements" ] } } ] -} \ No newline at end of file +} diff --git a/collections/hub/golden_path/settlement_management/master.json b/collections/hub/golden_path/settlement_management/master.json index 114a0ede..e259bf56 100644 --- a/collections/hub/golden_path/settlement_management/master.json +++ b/collections/hub/golden_path/settlement_management/master.json @@ -13,4 +13,4 @@ "type": "file" } ] -} \ No newline at end of file +} 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..7c6277f9 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -5,7 +5,8 @@ "id": 1, "name": "Pre-settlement account activation per participant and currency", "meta": { - "info": "Pre-settlement account activation per participant and currency" + "info": "Pre-settlement account activation per participant and currency", + "executionOrder": 2010 }, "requests": [ { @@ -680,6 +681,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -688,7 +690,8 @@ "id": 2, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 2020 }, "requests": [ { @@ -1862,6 +1865,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -1870,7 +1874,8 @@ "id": 3, "name": "Store settlement and position balances before", "meta": { - "info": "Store settlement and position balances before" + "info": "Store settlement and position balances before", + "executionOrder": 2030 }, "requests": [ { @@ -2188,6 +2193,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2196,7 +2202,8 @@ "id": 4, "name": "Send transfer $currency from SIM1 to SIM2", "meta": { - "info": "Send transfer $currency from SIM1 to SIM2" + "info": "Send transfer $currency from SIM1 to SIM2", + "executionOrder": 2044 }, "requests": [ { @@ -2222,8 +2229,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}", @@ -2500,6 +2507,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2508,7 +2516,8 @@ "id": 5, "name": "Send transfer $currency2 from SIM1 to PAYEEFSP", "meta": { - "info": "Send transfer $currency2 from SIM1 to PAYEEFSP" + "info": "Send transfer $currency2 from SIM1 to PAYEEFSP", + "executionOrder": 2044 }, "requests": [ { @@ -2534,8 +2543,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}", @@ -2808,6 +2817,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -2816,7 +2826,8 @@ "id": 6, "name": "Send transfer $currency from PAYERFSP to SIM1", "meta": { - "info": "Send transfer $currency from PAYERFSP to SIM1" + "info": "Send transfer $currency from PAYERFSP to SIM1", + "executionOrder": 2044 }, "requests": [ { @@ -2842,8 +2853,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}", @@ -3116,6 +3127,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3124,7 +3136,8 @@ "id": 7, "name": "Send transfer $currency2 from SIM2 to PAYERFSP", "meta": { - "info": "Send transfer $currency2 from SIM2 to PAYERFSP" + "info": "Send transfer $currency2 from SIM2 to PAYERFSP", + "executionOrder": 2044 }, "requests": [ { @@ -3150,8 +3163,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}", @@ -3282,7 +3295,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 +3303,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 +3423,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 +3431,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)", "}" ] @@ -3433,6 +3446,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3441,7 +3455,8 @@ "id": 8, "name": "Send transfer $currency from PAYEEFSP to SIM2", "meta": { - "info": "Send transfer $currency from PAYEEFSP to SIM2" + "info": "Send transfer $currency from PAYEEFSP to SIM2", + "executionOrder": 2044 }, "requests": [ { @@ -3467,8 +3482,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}", @@ -3741,6 +3756,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -3749,7 +3765,8 @@ "id": 9, "name": "Send transfer $currency2 from PAYEEFSP to PAYERFSP", "meta": { - "info": "Send transfer $currency2 from PAYEEFSP to PAYERFSP" + "info": "Send transfer $currency2 from PAYEEFSP to PAYERFSP", + "executionOrder": 2044 }, "requests": [ { @@ -3775,8 +3792,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}", @@ -4049,6 +4066,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4057,7 +4075,8 @@ "id": 10, "name": "Create Settlement on the current open window", "meta": { - "info": "Create Settlement on the current open window" + "info": "Create Settlement on the current open window", + "executionOrder": 2100 }, "requests": [ { @@ -4387,6 +4406,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4395,7 +4415,8 @@ "id": 11, "name": "Store Settlement&Position Account Balances After Transfers", "meta": { - "info": "Store Settlement&Position Account Balances After Transfers" + "info": "Store Settlement&Position Account Balances After Transfers", + "executionOrder": 2110 }, "requests": [ { @@ -4651,6 +4672,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -4659,7 +4681,8 @@ "id": 12, "name": "Prepare-settlements", "meta": { - "info": "Prepare-settlements" + "info": "Prepare-settlements", + "executionOrder": 2120 }, "requests": [ { @@ -5046,6 +5069,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5054,7 +5078,8 @@ "id": 13, "name": "Store Settlement&Position Account Balances After Prepare", "meta": { - "info": "Store Settlement&Position Account Balances After Prepare" + "info": "Store Settlement&Position Account Balances After Prepare", + "executionOrder": 2130 }, "requests": [ { @@ -5343,6 +5368,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5351,7 +5377,8 @@ "id": 14, "name": "reserve-settlement", "meta": { - "info": "reserve-settlement" + "info": "reserve-settlement", + "executionOrder": 2140 }, "requests": [ { @@ -5738,6 +5765,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -5746,7 +5774,8 @@ "id": 15, "name": "Store Settlement&Position Account Balances After Reserve", "meta": { - "info": "Store Settlement&Position Account Balances After Reserve" + "info": "Store Settlement&Position Account Balances After Reserve", + "executionOrder": 2150 }, "requests": [ { @@ -6054,6 +6083,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -6062,7 +6092,8 @@ "id": 16, "name": "commit-settlement", "meta": { - "info": "commit-settlement" + "info": "commit-settlement", + "executionOrder": 2160 }, "requests": [ { @@ -6449,6 +6480,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -6457,7 +6489,8 @@ "id": 17, "name": "Store Settlement&Position Account Balances After commit", "meta": { - "info": "Store Settlement&Position Account Balances After commit" + "info": "Store Settlement&Position Account Balances After commit", + "executionOrder": 2170 }, "requests": [ { @@ -6809,6 +6842,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -6817,7 +6851,8 @@ "id": 18, "name": "settle-settlement", "meta": { - "info": "settle-settlement" + "info": "settle-settlement", + "executionOrder": 2180 }, "requests": [ { @@ -7204,6 +7239,7 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } @@ -7212,7 +7248,8 @@ "id": 19, "name": "Store Settlement&Position Account Balances After Settle", "meta": { - "info": "Store Settlement&Position Account Balances After Settle" + "info": "Store Settlement&Position Account Balances After Settle", + "executionOrder": 2190 }, "requests": [ { @@ -7496,9 +7533,10 @@ "fileInfo": { "path": "hub/golden_path/settlement_management/mixed_settlement_model.json", "labels": [ + "prod-tests", "settlements" ] } } ] -} \ No newline at end of file +} 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..fdc45498 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)" ] } @@ -538,9 +538,9 @@ }, { "id": 3, - "description": "Check Error code 3102", + "description": "Check Error code 3101", "exec": [ - "expect(response.body.errorInformation.errorCode).to.eql('3102');" + "expect(response.body.errorInformation.errorCode).to.eql('3101');" ] } ] @@ -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}'", "" ] } @@ -1184,14 +1184,14 @@ "id": 2, "description": "Check mandatory element missing", "exec": [ - "expect(response.body.errorInformation.errorDescription).to.include('date'&&'Missing mandatory element');" + "expect(response.body.errorInformation.errorDescription).to.include('date'&&'Malformed syntax');" ] }, { "id": 3, - "description": "Check error code 3102", + "description": "Check error code 3101", "exec": [ - "expect(response.body.errorInformation.errorCode).to.eql('3102');" + "expect(response.body.errorInformation.errorCode).to.eql('3101');" ] } ] @@ -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)" ] } @@ -1362,7 +1362,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/Error-framework-authorizations.json" + "path": "hub/golden_path/transaction_request_service/Error-framework-authorizations.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/transaction_request_service/authorizations.json b/collections/hub/golden_path/transaction_request_service/authorizations.json index f0e029a6..917cbaa8 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)" ] } @@ -124,7 +124,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/authorizations.json" + "path": "hub/golden_path/transaction_request_service/authorizations.json", + "labels": [ + "prod-tests" + ] } } ] 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..36e5df9b 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')", @@ -167,9 +167,9 @@ }, { "id": 3, - "description": "Check Error code 3102", + "description": "Check Error code 3101", "exec": [ - "expect(response.body.errorInformation.errorCode).to.include('3102');" + "expect(response.body.errorInformation.errorCode).to.include('3101');" ] } ] @@ -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);", @@ -587,7 +587,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/error-framework.json" + "path": "hub/golden_path/transaction_request_service/error-framework.json", + "labels": [ + "prod-tests" + ] } } ] 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..2a63d8b8 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();", @@ -311,7 +311,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/received State.json" + "path": "hub/golden_path/transaction_request_service/received State.json", + "labels": [ + "prod-tests" + ] } } ] 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..54994874 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();", @@ -252,7 +252,7 @@ "headers": { "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", "FSPIOP-Destination": "{$inputs.payeefsp}", - "Date": "{$environment.transactionRequestDatex}", + "Date": "{$function.generic.curDate}", "Accept": "{$inputs.acceptTransactionRequests}", "FSPIOP-HTTP-Method": "GET", "FSPIOP-URI": "/transactionRequests", @@ -311,7 +311,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/rejected State.json" + "path": "hub/golden_path/transaction_request_service/rejected State.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/transaction_request_service/transaction_request_service_health.json b/collections/hub/golden_path/transaction_request_service/transaction_request_service_health.json index f3e448cc..f9778399 100644 --- a/collections/hub/golden_path/transaction_request_service/transaction_request_service_health.json +++ b/collections/hub/golden_path/transaction_request_service/transaction_request_service_health.json @@ -42,7 +42,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/transaction_request_service/transaction_request_service_health.json" + "path": "hub/golden_path/transaction_request_service/transaction_request_service_health.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json b/collections/hub/golden_path_fspiop/api-tests/Quotes/quotes-negative-scenarios.json similarity index 97% rename from collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json rename to collections/hub/golden_path_fspiop/api-tests/Quotes/quotes-negative-scenarios.json index 38739aa2..7d98b271 100644 --- a/collections/hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json +++ b/collections/hub/golden_path_fspiop/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}", @@ -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}')", "" @@ -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}", @@ -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}')", "" @@ -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}", @@ -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}')", "" @@ -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}", @@ -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}')", "" @@ -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}", @@ -1206,7 +1206,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json" + "path": "hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1241,8 +1244,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 +1361,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 +1478,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 +1595,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 +1710,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 +1825,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 +1940,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 +2055,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}", @@ -2144,7 +2147,10 @@ } ], "fileInfo": { - "path": "hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json" + "path": "hub/golden_path/api-tests/Quotes/quotes-negative-scenarios.json", + "labels": [ + "prod-tests" + ] } } ] 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..da5dd8be --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/discovery.json @@ -0,0 +1,129 @@ +{ + "name": "Party Lookup Happy Path", + "test_cases": [ + { + "id": "1", + "name": "Party Lookup for ProxyAB if not cached", + "requests": [ + { + "id": 1, + "meta": { + "info": "This request allows us to add a new participant to Account Lookup Service." + }, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}/{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "method": "post", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "body": { + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "ignoreCallbacks": false, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": "2", + "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_PAYEE_TEST_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "nonexistentpayerfsp", + "FSPIOP-Proxy": "{$inputs.PROXY1_NAME}", + "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_PAYEE_TEST_PAYEEFSP_ID}')" + ] + }, + { + "id": 3, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYEE_TEST_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={$inputs.expectedPartiesVersion}')" + ] + }, + { + "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_PAYEE_TEST_PAYEEFSP_PARTY_ID}')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/happy_path/master.json b/collections/hub/inter_scheme/as_payee_scheme/happy_path/master.json new file mode 100644 index 00000000..0e469501 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/master.json @@ -0,0 +1,16 @@ +{ + "order": [ + { + "name": "discovery.json", + "type": "file" + }, + { + "name": "quotes.json", + "type": "file" + }, + { + "name": "transfers.json", + "type": "file" + } + ] +} \ 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..ffff2039 --- /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": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "nonexistentpayerfsp", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "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_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_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={$inputs.expectedQuotesVersion}')" + ] + }, + { + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "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_PAYEE_TEST_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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "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_PAYEE_TEST_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_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}')" + ] + } + ] + }, + "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..ababa55b --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/happy_path/transfers.json @@ -0,0 +1,248 @@ +{ + "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": "{$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}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_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={$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", + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "transferId": "{$prev.1.request.body.transactionId}", + "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}" + }, + "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/master.json b/collections/hub/inter_scheme/as_payee_scheme/master.json new file mode 100644 index 00000000..2e3789bb --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "happy_path", + "type": "folder" + }, + { + "name": "negative_scenarios", + "type": "folder" + } + ] +} \ 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..c8f95b5f --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/discovery.json @@ -0,0 +1,107 @@ +{ + "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, + "meta": { + "info": "This request allows us to add a new participant to Account Lookup Service." + }, + "description": "Add Participant to ALS", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}/{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID}", + "method": "post", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}" + }, + "headers": { + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}", + "Accept": "{$inputs.acceptParticipants}", + "Content-Type": "{$inputs.contentTypeParticipants}", + "Date": "{$function.generic.curDate}" + }, + "body": { + "fspId": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "currency": "{$inputs.PROXY_AMOUNT_CURRENCY}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "ignoreCallbacks": false, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + }, + "disabled": false + }, + { + "id": "2", + "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_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}" + }, + "headers": { + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_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.PROXY_PAYEE_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/master.json b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/master.json new file mode 100644 index 00000000..0e469501 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/master.json @@ -0,0 +1,16 @@ +{ + "order": [ + { + "name": "discovery.json", + "type": "file" + }, + { + "name": "quotes.json", + "type": "file" + }, + { + "name": "transfers.json", + "type": "file" + } + ] +} \ 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..cd3d61db --- /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": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_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_PAYEE_TEST_PAYEEFSP_PARTY_ID_ERROR}", + "fspId": "{$inputs.PROXY_PAYEE_TEST_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_PAYEE_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + } + ] +} \ 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..2f104fb6 --- /dev/null +++ b/collections/hub/inter_scheme/as_payee_scheme/negative_scenarios/transfers.json @@ -0,0 +1,77 @@ +{ + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "FSPIOP-Proxy": "{$inputs.PROXY_HEADER}" + }, + "body": { + "transferId": "{$function.generic.generateID}", + "payerFsp": "{$inputs.PROXY_PAYEE_TEST_PAYERFSP_ID}", + "payeeFsp": "{$inputs.PROXY_PAYEE_TEST_PAYEEFSP_ID}", + "amount": { + "amount": "{$inputs.PROXY_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..80d115e4 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/discovery.json @@ -0,0 +1,159 @@ +{ + "name": "Party Lookup Happy Path", + "test_cases": [ + { + "id": "1", + "name": "Party Lookup for ProxyAB if not cached", + "requests": [ + { + "id": 1, + "description": "Delete Proxied party from Oracle", + "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.PROXY_PAYEEFSP_PARTY_ID_TYPE}/{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "method": "delete", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYERFSP_PARTY_ID}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Content-Type": "application/vnd.interoperability.iso20022.participants+json;version=2.0", + "Accept": "application/vnd.interoperability.iso20022.participants+json;version=2.0" + }, + "ignoreCallbacks": true, + "disabled": false + }, + { + "id": "2", + "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_PAYER_TEST_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_PAYEEFSP_ID}')" + ] + }, + { + "id": 4, + "description": "Response Destination Header same as Payerfsp Id", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$inputs.PROXY_PAYER_TEST_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}')" + ] + }, + { + "id": 7, + "description": "Callback partyIdInfo (partyIdType, partyIdentifier)", + "exec": [ + "expect(callback.body.party.partyIdInfo.partyIdentifier).to.equal('{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}')" + ] + } + ] + } + }, + { + "id": "3", + "description": "Send Oracle lookup request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_ORACLE_MSISDN}", + "operationPath": "/participants/{Type}/{ID}", + "method": "get", + "params": { + "Type": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "ID": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_PAYEEFSP_ID}')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/inter_scheme/as_payer_scheme/happy_path/master.json b/collections/hub/inter_scheme/as_payer_scheme/happy_path/master.json new file mode 100644 index 00000000..0e469501 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/master.json @@ -0,0 +1,16 @@ +{ + "order": [ + { + "name": "discovery.json", + "type": "file" + }, + { + "name": "quotes.json", + "type": "file" + }, + { + "name": "transfers.json", + "type": "file" + } + ] +} \ 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..dd1a4cc3 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/quotes.json @@ -0,0 +1,176 @@ +{ + "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": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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={$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", + "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..395fd191 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/happy_path/transfers.json @@ -0,0 +1,246 @@ +{ + "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": "{$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}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYEEFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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={$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", + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "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}" + }, + "body": { + "transferId": "{$prev.1.request.body.transactionId}", + "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}" + }, + "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/master.json b/collections/hub/inter_scheme/as_payer_scheme/master.json new file mode 100644 index 00000000..2e3789bb --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "happy_path", + "type": "folder" + }, + { + "name": "negative_scenarios", + "type": "folder" + } + ] +} \ 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..b1b77ccf --- /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_PAYER_TEST_PAYEEFSP_PARTY_ID}" + }, + "headers": { + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_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).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + }, + { + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_2XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_3XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_4XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorCode and errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + }, + "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_PAYER_TEST_PAYEEFSP_PARTY_ID_ERROR}" + }, + "headers": { + "Accept": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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.PROXY_PAYER_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')" + ] + }, + { + "id": 3, + "description": "Callback response has errorDescription", + "exec": [ + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + }, + { + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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).to.have.property('errorDescription')" + ] + } + ] + }, + "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": "{$inputs.acceptParties}", + "Content-Type": "{$inputs.contentTypeParties}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_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).to.have.property('errorDescription')" + ] + } + ] + }, + "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/hub/inter_scheme/as_payer_scheme/negative_scenarios/master.json b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/master.json new file mode 100644 index 00000000..0e469501 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/master.json @@ -0,0 +1,16 @@ +{ + "order": [ + { + "name": "discovery.json", + "type": "file" + }, + { + "name": "quotes.json", + "type": "file" + }, + { + "name": "transfers.json", + "type": "file" + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4db56c32 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/quotes.json @@ -0,0 +1,642 @@ +{ + "name": "Quotes Negative Scenarios", + "test_cases": [ + { + "id": "1", + "name": "Test Case for Bad Request - 400", + "requests": [ + { + "id": "1", + "description": "Quote request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_PAYEEFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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 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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_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).to.have.property('errorDescription')" + ] + } + ] + }, + "disabled": true + } + ] + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_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_PAYER_TEST_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.PROXY_HEADER}')" + ] + }, + { + "id": 3, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "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).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_SCHEME_2XXX}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_2XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_SCHEME_3XXX}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_3XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_SCHEME_4XXX}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_4XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_SCHEME_5XXX}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYEE_SCHEME_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + }, + { + "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": { + "Accept": "{$inputs.acceptQuotes}", + "Content-Type": "{$inputs.contentTypeQuotes}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.PROXY_PAYERFSP_PARTY_ID_TYPE}", + "partyIdentifier": "{$inputs.PROXY_PAYERFSP_PARTY_ID}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_PAYEEFSP_PARTY_ID_ERROR}", + "fspId": "{$inputs.PROXY_PAYER_TEST_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_PAYER_TEST_PAYEE_DFSP_ERROR_CODE_5XXX}')", + "expect(callback.body.errorInformation).to.have.property('errorDescription')" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file 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..13880bb1 --- /dev/null +++ b/collections/hub/inter_scheme/as_payer_scheme/negative_scenarios/transfers.json @@ -0,0 +1,236 @@ +{ + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateID}", + "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}" + }, + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateID}", + "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}" + }, + "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_ML_API_ADAPTER}", + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.acceptTransfers}", + "Content-Type": "{$inputs.contentTypeTransfers}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.PROXY_PAYER_TEST_PAYERFSP_ID}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.PROXY_PAYER_TEST_PAYEEFSP_ID}" + }, + "body": { + "transferId": "{$function.generic.generateID}", + "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}" + }, + "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/inter_scheme/master.json b/collections/hub/inter_scheme/master.json new file mode 100644 index 00000000..e81ee034 --- /dev/null +++ b/collections/hub/inter_scheme/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "as_payee_scheme", + "type": "folder" + }, + { + "name": "as_payer_scheme", + "type": "folder" + } + ] +} \ 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/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-invalid-timestamp.json b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json index fb3a4f96..df2c8034 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json @@ -411,14 +411,14 @@ " let _callback = callback", "", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.bulkTransferResponse = _response", + " requestVariables.bulkTransferCallback = _callback", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _callback?.body?.bulkTransferState === expectedBulkTransferState;", " ", " if (isOk) {", " console.log(`Everything is OK, let's continue`)", - " requestVariables.bulkTransferResponse = _response", - " requestVariables.bulkTransferCallback = _callback", " break;", " } else {", " console.log(`Everything is NOT OK, let's wait for ${maxRetryWait}ms, and try again...`)", @@ -512,12 +512,12 @@ " let _response = response", "", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.participantsPositionResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode;", " ", " if (isOk) {", - " requestVariables.participantsPositionResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", @@ -596,12 +596,12 @@ " let _response = response", "", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.participantsPositionResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode;", " ", " if (isOk) {", - " requestVariables.participantsPositionResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", diff --git a/collections/hub/other_tests/bulk_transfers/bulk-transfer-timeout-scenario.json b/collections/hub/other_tests/bulk_transfers/bulk-transfer-timeout-scenario.json index 20c61446..97f4038e 100644 --- a/collections/hub/other_tests/bulk_transfers/bulk-transfer-timeout-scenario.json +++ b/collections/hub/other_tests/bulk_transfers/bulk-transfer-timeout-scenario.json @@ -328,12 +328,12 @@ " let _response = response", " ", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.participantsPositionResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode && _response.body[0].value === (+environment.payerfspPositionBeforePrepare)", " ", " if (isOk) {", - " requestVariables.participantsPositionResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", @@ -411,12 +411,12 @@ " let _response = response", " ", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.participantsPositionResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode && _response.body[0].value === (+environment.payeefspPositionBeforePrepare)", " ", " if (isOk) {", - " requestVariables.participantsPositionResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", 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/master.json b/collections/hub/other_tests/master.json index 917f5c39..fb674900 100644 --- a/collections/hub/other_tests/master.json +++ b/collections/hub/other_tests/master.json @@ -11,6 +11,14 @@ { "name": "v1.1_changes", "type": "folder" + }, + { + "name": "settlement_cgs", + "type": "folder" + }, + { + "name": "settlement_fx", + "type": "folder" } ] } \ No newline at end of file diff --git a/collections/hub/golden_path/settlement_cgs/newsetcgs.json b/collections/hub/other_tests/settlement_cgs/newsetcgs.json similarity index 99% rename from collections/hub/golden_path/settlement_cgs/newsetcgs.json rename to collections/hub/other_tests/settlement_cgs/newsetcgs.json index 027ed061..581d4580 100644 --- a/collections/hub/golden_path/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", @@ -5463,12 +5463,12 @@ " let _response = response", " ", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.scenarioResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode;", " ", " if (isOk) {", - " requestVariables.scenarioResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", @@ -6341,12 +6341,12 @@ " let _response = response", " ", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.scenarioResponse = _response", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = _response.code === expectedStatusCode;", " ", " if (isOk) {", - " requestVariables.scenarioResponse = _response", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", diff --git a/collections/hub/other_tests/settlement_fx/settlement_tests.json b/collections/hub/other_tests/settlement_fx/settlement_tests.json new file mode 100644 index 00000000..e3cb436c --- /dev/null +++ b/collections/hub/other_tests/settlement_fx/settlement_tests.json @@ -0,0 +1,1397 @@ +{ + "options": {}, + "name": "collections_tests_fx_fx_tests", + "test_cases": [ + { + "id": 1, + "name": "Settlement FX Transfer tests", + "fileInfo": { + "path": "hub/golden_path/fx/feature_tests/settlement/settlement_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.FX_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.FX_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.generateID}", + "conversionTerms": { + "conversionId": "{$function.generic.generateID}", + "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 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.FX_PAYER_DFSP_ID}", + "FSPIOP-Destination": "{$inputs.FXP_PAYEE_DFSP_ID}" + }, + "body": { + "quoteId": "{$function.generic.generateID}", + "transactionId": "{$function.generic.generateID}", + "transactionRequestId": "{$function.generic.generateID}", + "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.FX_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.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": 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.FX_PAYER_DFSP_ID}" + }, + "body": { + "commitRequestId": "{$prev.4.callback.body.conversionTerms.conversionId}", + "determiningTransferId": "{$function.generic.generateID}", + "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": "{$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.FX_PAYER_DFSP_ID}", + "amount": { + "currency": "{$inputs.FX_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.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 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.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.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}`);" + ] + } + } + } + ] + }, + { + "id": 2, + "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/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 11, + "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/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)", + "//}" + ] + } + ] + }, + "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/fx/feature_tests/settlement/settlement_tests.json", + "labels": [ + "fx" + ] + } + }, + { + "id": 13, + "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/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": 15, + "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.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.fxpSourceCurrencyPositionBalanceAfterSettlement= curAccount.value", + " }", + "})", + "", + "res.filter(account => account.currency === environment.FX_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}`);" + ] + } + } + } + ], + "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/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 99% 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 index a3f3c3ae..5f2635d1 100644 --- 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 @@ -1152,7 +1152,7 @@ } ], "fileInfo": { - "path": "hub/provisioning/CGS_Specific/add-users-to-new-sims-and-als-registration.json" + "path": "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 98% 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 index 7cac5a30..cfcfe6c8 100644 --- a/collections/hub/provisioning/CGS_Specific/adjust-participants-limits.json +++ b/collections/hub/provisioning/for_golden_path/CGS_Specific/adjust-participants-limits.json @@ -54,12 +54,12 @@ " let statusCode = response.code", "", " for (let retryCount = 0 ; retryCount < maxRetryCount; retryCount++) {", + " requestVariables.participantLimitsResponseCode = statusCode", " console.log(`retry-count=${retryCount+1}, max-count=${maxRetryCount}, max-wait=${maxRetryWait}`)", " ", " const isOk = statusCode === expectedStatusCode;", " ", " if (isOk) {", - " requestVariables.participantLimitsResponseCode = statusCode", " console.log(`Everything is OK, let's continue`)", " break;", " } else {", @@ -378,7 +378,7 @@ } ], "fileInfo": { - "path": "hub/provisioning/CGS_Specific/adjust-participants-limits.json" + "path": "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 95% rename from collections/hub/provisioning/CGS_Specific/oracle-onboarding.json rename to collections/hub/provisioning/for_golden_path/CGS_Specific/oracle-onboarding.json index cfc083ad..3695b500 100644 --- a/collections/hub/provisioning/CGS_Specific/oracle-onboarding.json +++ b/collections/hub/provisioning/for_golden_path/CGS_Specific/oracle-onboarding.json @@ -32,7 +32,7 @@ "body": { "oracleIdType": "MSISDN", "endpoint": { - "value": "{$environment.HOST_SIMULATOR}/oracle", + "value": "{$environment.HOST_ORACLE_MSISDN}", "endpointType": "URL" }, "currency": "{$environment.cgscurrency}", @@ -103,7 +103,7 @@ } ], "fileInfo": { - "path": "hub/provisioning/CGS_Specific/oracle-onboarding.json" + "path": "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 85% rename from collections/hub/provisioning/MojaloopHub_Setup/hub.json rename to collections/hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json index 36e2e2b8..a15f0f1e 100644 --- a/collections/hub/provisioning/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,14 @@ "meta": { "info": "Hub Account" }, + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopHub_Setup/hub.json", + "labels": [ + "prod-tests", + "min-func-tests", + "basic-func-tests" + ] + }, "requests": [ { "id": 1, @@ -373,23 +382,115 @@ } ] } + }, + { + "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", + "labels": [ + "prod-tests", + "min-func-tests", + "basic-func-tests" + ] + }, + "meta": { + "info": "Settlement Models" + }, "requests": [ { "id": 2, "meta": { - "info": "Create settlement model DEFERRED NET USD" + "info": "Create settlement model DEFERRED NET XXX" }, - "description": "Create settlement model DEFERRED NET USD", + "description": "Create settlement model DEFERRED NET XXX", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -399,14 +500,14 @@ "path": "/settlementModels", "method": "post", "body": { - "name": "DEFERREDNET{$inputs.currency}", + "name": "DEFERREDNETXXX", "settlementGranularity": "NET", "settlementInterchange": "MULTILATERAL", "settlementDelay": "DEFERRED", "requireLiquidityCheck": true, "ledgerAccountType": "POSITION", "autoPositionReset": true, - "currency": "{$inputs.currency}", + "currency": "XXX", "settlementAccountType": "SETTLEMENT" }, "headers": { @@ -557,15 +658,23 @@ "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", + "labels": [ + "prod-tests", + "min-func-tests", + "basic-func-tests" + ] + }, + "meta": { + "info": "Oracle Onboarding" + }, "requests": [ { "id": 1, @@ -584,7 +693,7 @@ "body": { "oracleIdType": "MSISDN", "endpoint": { - "value": "{$inputs.HOST_SIMULATOR}/oracle", + "value": "{$inputs.HOST_ORACLE_MSISDN}", "endpointType": "URL" }, "currency": "{$inputs.currency}", @@ -702,10 +811,7 @@ ] } } - ], - "fileInfo": { - "path": "hub/provisioning/MojaloopHub_Setup/hub.json" - } + ] } ] -} \ No newline at end of file +} diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/master.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/master.json similarity index 53% rename from collections/hub/provisioning/MojaloopSims_Onboarding/master.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/master.json index 8a64c4d4..582557d8 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/master.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/master.json @@ -22,11 +22,17 @@ }, { "name": "testingtoolkitdfsp.json", - "type": "file" + "type": "file", + "labels": [ + "min-func-tests" + ] }, { "name": "ttkpayeefsp.json", - "type": "file" + "type": "file", + "labels": [ + "min-func-tests" + ] }, { "name": "testfsp3.json", @@ -35,6 +41,27 @@ { "name": "testfsp4.json", "type": "file" + }, + { + "name": "ttkfxp1.json", + "type": "file", + "labels": [ + "min-func-tests" + ] + }, + { + "name": "ttkfxpayee.json", + "type": "file", + "labels": [ + "min-func-tests" + ] + }, + { + "name": "ttkfxpayer.json", + "type": "file", + "labels": [ + "min-func-tests" + ] } ] } \ No newline at end of file diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json similarity index 99% rename from collections/hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json index 26807749..1ae3eaf5 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json @@ -699,7 +699,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1533,7 +1536,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1659,7 +1665,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/noresponsepayeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/noresponsepayeefsp.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json similarity index 98% rename from collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json index 1dbed8fd..2163f109 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json @@ -699,7 +699,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1533,7 +1536,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1659,7 +1665,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1714,7 +1723,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1804,7 +1816,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payeefsp.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json similarity index 99% rename from collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json index dbdb932f..ed522d68 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json @@ -705,7 +705,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payerfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1539,7 +1542,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payerfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1665,7 +1671,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payerfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1755,7 +1764,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/payerfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/payerfsp.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json similarity index 98% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json index 5cf284e7..73db344f 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json @@ -699,7 +699,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1347,7 +1350,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1473,7 +1479,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1528,7 +1537,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1618,7 +1630,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp1.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp1.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json similarity index 98% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json index a283ec9d..beb090cd 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json @@ -699,7 +699,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp2.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1347,7 +1350,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp2.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1473,7 +1479,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp2.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1528,7 +1537,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp2.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json", + "labels": [ + "prod-tests" + ] } }, { @@ -1618,7 +1630,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp2.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp2.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp3.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json similarity index 98% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp3.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json index 7bc42f9c..ec2d2872 100644 --- a/collections/hub/provisioning/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", "", "", @@ -210,7 +210,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp3.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json", + "labels": [ + "prod-tests" + ] } }, { @@ -703,7 +706,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp3.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json", + "labels": [ + "prod-tests" + ] } }, { @@ -796,7 +802,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp3.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp3.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp4.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json similarity index 98% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testfsp4.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json index 044232ba..edffea51 100644 --- a/collections/hub/provisioning/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", "", "", @@ -210,7 +210,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp4.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json", + "labels": [ + "prod-tests" + ] } }, { @@ -703,7 +706,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp4.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json", + "labels": [ + "prod-tests" + ] } }, { @@ -796,7 +802,10 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testfsp4.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testfsp4.json", + "labels": [ + "prod-tests" + ] } } ] diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json similarity index 90% rename from collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json index a4838422..45b47175 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,205 @@ } ] } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "id": 3, + "name": "Endpoints", + "meta": { + "info": "Endpoints" + }, + "requests": [ { "id": 3, "meta": { @@ -981,37 +1179,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 +1216,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 +1253,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,44 +1290,36 @@ }, { "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)" ] } ] @@ -1147,11 +1327,15 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] } }, { - "id": 2, + "id": 4, "name": "testingtoolkitdfsp fundsin", "meta": { "info": "testingtoolkitdfsp fundsin" @@ -1593,7 +1777,11 @@ } ], "fileInfo": { - "path": "hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/testingtoolkitdfsp.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] } } ] 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..2e76da92 --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json @@ -0,0 +1,1488 @@ +{ + "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.FX_SOURCE_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.FX_SOURCE_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)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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.FX_TARGET_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 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.FX_TARGET_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)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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('FX_TARGET_CURRENCY')) {", + " 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.FX_TARGET_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('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('FX_TARGET_CURRENCY') && 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()" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxp1.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + } + ] +} \ 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..d34d4446 --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json @@ -0,0 +1,1156 @@ +{ + "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.FX_TARGET_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 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.FX_TARGET_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)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayee.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + } + ] +} \ 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..d27051ae --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json @@ -0,0 +1,1389 @@ +{ + "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.FX_SOURCE_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.FX_SOURCE_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)", + "}" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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)" + ] + } + ] + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + }, + { + "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('FX_SOURCE_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.FX_SOURCE_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('FX_SOURCE_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()" + ] + } + } + } + ], + "fileInfo": { + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkfxpayer.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] + } + } + ] +} \ 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 92% rename from collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json rename to collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json index 689b051d..e99cd3a2 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json +++ b/collections/hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json @@ -1144,10 +1144,100 @@ } ] } + }, + { + "id": 31, + "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 + }, + { + "id": 32, + "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/ttkpayeefsp.json" + "path": "hub/provisioning/for_golden_path/MojaloopSims_Onboarding/ttkpayeefsp.json", + "labels": [ + "prod-tests", + "min-func-tests" + ] } } ] diff --git a/collections/hub/provisioning/for_golden_path/master.json b/collections/hub/provisioning/for_golden_path/master.json new file mode 100644 index 00000000..085a225f --- /dev/null +++ b/collections/hub/provisioning/for_golden_path/master.json @@ -0,0 +1,23 @@ +{ + "order": [ + { + "name": "MojaloopHub_Setup", + "type": "folder", + "labels": [ + "prod-tests", + "min-func-tests" + ] + }, + { + "name": "MojaloopSims_Onboarding", + "type": "folder", + "labels": [ + "prod-tests" + ] + }, + { + "name": "CGS_Specific", + "type": "folder" + } + ] +} \ No newline at end of file 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..96ddbd3e --- /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": 10000000000 + }, + "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', 5000000000);" + ] + } + } + }, + { + "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/collections/hub/provisioning/for_inter_scheme/proxy_2.json b/collections/hub/provisioning/for_inter_scheme/proxy_2.json new file mode 100644 index 00000000..3bea968b --- /dev/null +++ b/collections/hub/provisioning/for_inter_scheme/proxy_2.json @@ -0,0 +1,1376 @@ +{ + "name": "multi", + "test_cases": [ + { + "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.PROXY2_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.PROXY2_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "body": { + "currency": "{$inputs.currency}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000000000 + }, + "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_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_NAME}/accounts/{$environment.dfspSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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', 5000000000);" + ] + } + } + }, + { + "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_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_POST", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_FX_QUOTES", + "value": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_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.PROXY2_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PROXY2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.PROXY2_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/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 98% rename from collections/hub/provisioning_thirdparty/hub.json rename to collections/hub/provisioning/for_thirdparty/hub.json index 9ce165d4..af5c4a55 100644 --- a/collections/hub/provisioning_thirdparty/hub.json +++ b/collections/hub/provisioning/for_thirdparty/hub.json @@ -302,9 +302,9 @@ { "id": 2, "meta": { - "info": "Create settlement model DEFERRED NET USD" + "info": "Create settlement model DEFERRED NET XXX" }, - "description": "Create settlement model DEFERRED NET USD", + "description": "Create settlement model DEFERRED NET XXX", "apiVersion": { "minorVersion": 0, "majorVersion": 1, @@ -314,14 +314,14 @@ "path": "/settlementModels", "method": "post", "body": { - "name": "DEFERREDNET{$inputs.currency}", + "name": "DEFERREDNETXXX", "settlementGranularity": "NET", "settlementInterchange": "MULTILATERAL", "settlementDelay": "DEFERRED", "requireLiquidityCheck": true, "ledgerAccountType": "POSITION", "autoPositionReset": true, - "currency": "{$inputs.currency}", + "currency": "XXX", "settlementAccountType": "SETTLEMENT" }, "headers": { @@ -417,7 +417,7 @@ "body": { "oracleIdType": "MSISDN", "endpoint": { - "value": "{$inputs.HOST_SIMULATOR}/oracle", + "value": "{$inputs.HOST_ORACLE_MSISDN}", "endpointType": "URL" }, "currency": "{$inputs.currency}", @@ -587,4 +587,4 @@ } } ] -} \ No newline at end of file +} 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/master.json b/collections/hub/provisioning/master.json index 8d7f9fc5..2b3b049a 100644 --- a/collections/hub/provisioning/master.json +++ b/collections/hub/provisioning/master.json @@ -1,15 +1,24 @@ { "order": [ { - "name": "MojaloopHub_Setup", + "name": "for_golden_path", + "type": "folder", + "labels": [] + }, + { + "name": "for_inter_scheme", + "type": "folder" + }, + { + "name": "for_sdk_bulk", "type": "folder" }, { - "name": "MojaloopSims_Onboarding", + "name": "for_thirdparty", "type": "folder" }, { - "name": "CGS_Specific", + "name": "new_participants", "type": "folder" } ] diff --git a/collections/hub/provisioning/new_participants/master.json b/collections/hub/provisioning/new_participants/master.json new file mode 100644 index 00000000..93a51847 --- /dev/null +++ b/collections/hub/provisioning/new_participants/master.json @@ -0,0 +1,12 @@ +{ + "order": [ + { + "name": "new_dfsp.json", + "type": "file" + }, + { + "name": "new_fxp.json", + "type": "file" + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_dfsp/newdfsp.json b/collections/hub/provisioning/new_participants/new_dfsp.json similarity index 89% rename from collections/hub/provisioning_dfsp/newdfsp.json rename to collections/hub/provisioning/new_participants/new_dfsp.json index 20296b8a..09b48ff7 100644 --- a/collections/hub/provisioning_dfsp/newdfsp.json +++ b/collections/hub/provisioning/new_participants/new_dfsp.json @@ -3,7 +3,145 @@ "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": 3, + "meta": { + "info": "Register MSISDN Oracle" + }, + "description": "Register MSISDN Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "operationPath": "/oracles", + "path": "/oracles", + "method": "post", + "body": { + "oracleIdType": "MSISDN", + "endpoint": { + "value": "{$inputs.HOST_ORACLE_MSISDN}", + "endpointType": "URL" + }, + "currency": "{$inputs.currency}", + "isDefault": true + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_ADMIN}", + "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(201)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "Setup DFSP accounts and limits", "meta": { "info": "DFSP account" }, @@ -24,7 +162,8 @@ "method": "post", "body": { "name": "{$inputs.DFSP_NAME}", - "currency": "{$inputs.currency}" + "currency": "{$inputs.currency}", + "isProxy": "{$inputs.isProxy}" }, "headers": { "Content-Type": "application/json", @@ -68,7 +207,7 @@ "currency": "{$inputs.currency}", "limit": { "type": "NET_DEBIT_CAP", - "value": 10000 + "value": "{$inputs.NET_DEBIT_CAP}" }, "initialPosition": 0 }, @@ -165,7 +304,7 @@ "action": "recordFundsIn", "reason": "string", "amount": { - "amount": "{$environment.dfspfundsInPrepareAmount}", + "amount": "{$inputs.fundsIn}", "currency": "{$inputs.currency}" }, "extensionList": { @@ -197,8 +336,7 @@ "preRequest": { "exec": [ "var uuid = require('uuid');", - "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())", - "pm.environment.set('dfspfundsInPrepareAmount', 5000);" + "pm.environment.set('dfspfundsInPrepareTransferId', uuid.v4())" ] } } @@ -238,7 +376,7 @@ "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)" + "expect(+environment.dfspSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspSettlementAccountBalanceBeforeFundsIn - {$inputs.fundsIn})" ] } ] @@ -260,11 +398,11 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } }, { - "id": 2, + "id": 3, "name": "Setup Callback Endpoints", "meta": { "info": "DFSP callbacks" @@ -1242,11 +1380,11 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } }, { - "id": 3, + "id": 4, "name": "Setup Notification Emails", "meta": { "info": "DFSP notification_emails" @@ -1368,7 +1506,7 @@ } ], "fileInfo": { - "path": "hub/provisioning_dfsp/newdfsp.json" + "path": "hub/provisioning/new_participants/new_dfsp.json" } } ] diff --git a/collections/hub/provisioning/new_participants/new_fxp.json b/collections/hub/provisioning/new_participants/new_fxp.json new file mode 100644 index 00000000..2c72384a --- /dev/null +++ b/collections/hub/provisioning/new_participants/new_fxp.json @@ -0,0 +1,1467 @@ +{ + "options": {}, + "name": "switch_onboarding_participant_fxp", + "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 FXP 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, + "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": 3, + "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)", + " }", + "}" + ] + } + } + } + ] + }, + { + "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 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": { diff --git a/collections/pm4ml/fxp2p/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/fxp2p/sdk_fx_transfer.json rename to collections/pm4ml/golden_path/forex/feature_tests/happy_path/sdk_fx_transfer.json diff --git a/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_error.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_error.json new file mode 100644 index 00000000..cfc824d8 --- /dev/null +++ b/collections/pm4ml/golden_path/forex/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/golden_path/forex/feature_tests/negative_scenarios/fxp_non_success_states.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_non_success_states.json new file mode 100644 index 00000000..66851c74 --- /dev/null +++ b/collections/pm4ml/golden_path/forex/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/golden_path/forex/feature_tests/negative_scenarios/fxp_timeout_scenarios.json b/collections/pm4ml/golden_path/forex/feature_tests/negative_scenarios/fxp_timeout_scenarios.json new file mode 100644 index 00000000..72a61d9b --- /dev/null +++ b/collections/pm4ml/golden_path/forex/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/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/environments/hub.json b/environments/hub.json index b2d26ec3..e9a4fb3a 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -17,6 +17,8 @@ "HOST_TRANSACTION_REQUESTS_SERVICE": "http://transaction-requests-service", "HOST_THIRDPARTY_API_SVC": "http://thirdparty-api-svc", "HOST_ORACLE_CONSENT": "http://als-consent-oracle", + "HOST_ORACLE": "http://simulator/oracle", + "HOST_ORACLE_MSISDN": "http://als-msisdn-oracle", "PAYEEFSP_BACKEND_TESTAPI_URL": "http://sim-payeefsp-backend:3003", "PAYEEFSP_CALLBACK_URL": "http://sim-payeefsp-scheme-adapter:4000", "PAYEEFSP_SDK_TESTAPI_URL": "http://sim-payeefsp-scheme-adapter:4002", @@ -196,6 +198,7 @@ "payeefspMSISDN": "17039811907", "payerfspMSISDN": "17891239876", "settlementtestNonExistingMSISDN": "22244803917", + "fundsIn": "5000", "NET_DEBIT_CAP": "50000", "TTKSIM1_NAME": "$param_simNameTTKSim1", "TTKSIM2_NAME": "$param_simNameTTKSim2", @@ -213,6 +216,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": "5671234", + "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..63534639 --- /dev/null +++ b/environments/hub/forex/fxp-env.json @@ -0,0 +1,31 @@ +{ + "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_ORACLE_MSISDN": "http://moja1-als-msisdn-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_cgs.json b/environments/hub_cgs.json index 154ac601..b3d4ed5b 100644 --- a/environments/hub_cgs.json +++ b/environments/hub_cgs.json @@ -169,6 +169,7 @@ "payeefspMSISDN": "17039811907", "payerfspMSISDN": "17891239876", "settlementtestNonExistingMSISDN": "22244803917", + "fundsIn": "5000", "NET_DEBIT_CAP": "50000" } } 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/environments/provisioning_dfsp.json b/environments/provisioning_dfsp.json index 4066962e..7fc40b6b 100644 --- a/environments/provisioning_dfsp.json +++ b/environments/provisioning_dfsp.json @@ -6,6 +6,7 @@ "DFSP_NAME": "dfspid", "currency": "USD", "hub_operator": "NOT_APPLICABLE", + "fundsIn": "5000", "NET_DEBIT_CAP": "50000" } } \ No newline at end of file diff --git a/rules/hub/rules_callback/default.json b/rules/hub/rules_callback/default.json new file mode 100644 index 00000000..788adbaa --- /dev/null +++ b/rules/hub/rules_callback/default.json @@ -0,0 +1,4565 @@ +[ + { + "ruleId": 200, + "priority": 1, + "description": "post /participants/{Type}/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 201, + "priority": 1, + "description": "get /participants/{Type}/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 202, + "priority": 1, + "description": "post /participants/{Type}/{ID}/{SubId} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 203, + "priority": 1, + "description": "get /participants/{Type}/{ID}/{SubId} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 204, + "priority": 1, + "description": "post /participants - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 205, + "priority": 1, + "description": "get /parties/{Type}/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "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" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 206, + "priority": 1, + "description": "get /parties/{Type}/{ID}/{SubId} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 207, + "priority": 1, + "description": "post /transactionRequests - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 208, + "priority": 1, + "description": "get /transactionRequests/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 209, + "priority": 1, + "description": "post /quotes - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 210, + "priority": 1, + "description": "get /quotes/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 211, + "priority": 1, + "description": "get /authorizations/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/authorizations/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/authorizations/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 212, + "priority": 1, + "description": "post /transfers - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "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": 213, + "priority": 1, + "description": "get /transfers/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 214, + "priority": 1, + "description": "get /transactions/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactions/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactions/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 215, + "priority": 1, + "description": "post /bulkQuotes - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 216, + "priority": 1, + "description": "get /bulkQuotes/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 217, + "priority": 1, + "description": "post /bulkTransfers - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 218, + "priority": 1, + "description": "get /bulkTransfers/{ID} - No callback", + "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" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "noresponsepayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 256, + "priority": 1, + "description": "post /transfers - ISO20022 PUT Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "104", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "OrgnlEndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}", + "OrgnlTxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "COMM", + "StsRsnInf": { + "Rsn": { + "Prtry": "COMM" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "PrcgDt": { + "Dt": "{$environment.AccptncDtTm}" + }, + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "doesnotexistfsp" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 255, + "priority": 1, + "description": "post /transfers - ISO20022 PATCH Notifications Failure Test-case due to invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "103", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "OrgnlEndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}", + "OrgnlTxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RESV", + "StsRsnInf": { + "Rsn": { + "Prtry": "RESV" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "PrcgDt": { + "Dt": "{$environment.AccptncDtTm}" + }, + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "k_7vmljvqNZMrbQJhSfH4o-OKb0pl8FrTmzSGhF8w74", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 254, + "priority": 1, + "description": "post /transfers - ISO20022 ttkpayeefsp PATCH Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "102", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "OrgnlEndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}", + "OrgnlTxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RESV", + "StsRsnInf": { + "Rsn": { + "Prtry": "RESV" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "PrcgDt": { + "Dt": "{$environment.AccptncDtTm}" + }, + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "doesnotexistfsp" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 253, + "priority": 1, + "description": "post /transfers - ISO20022 p2p_money_transfer_patch_notifications - payee receives PATCH Notification with COMMITTED after sending callback with RESERVED", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "101", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "OrgnlEndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}", + "OrgnlTxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RESV", + "StsRsnInf": { + "Rsn": { + "Prtry": "RESV" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "PrcgDt": { + "Dt": "{$environment.AccptncDtTm}" + }, + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 1, + "priority": 1, + "description": "ISO20022 Proxy get /parties/{Type}/{ID} Payer Scheme with Payee side Proxy as TTK - Happy Path", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "123456", + "path": "ID" + }, + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "nonexistentpayeefsp", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "testingtoolkitdfsp", + "fspiop-proxy": "proxyttk" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "ttkpayeefsp" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "ttkpayeefsp" + } + } + }, + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 2, + "priority": 1, + "description": "ISO20022 Proxy get /parties/{Type}/{ID} Payee side scheme with Payer side proxy as TTK and Payee DFSP as proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "7891234", + "path": "ID" + }, + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "ttkpayeefsp", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "payeefspproxyttk" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "payeefspproxyttk" + } + } + }, + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 52, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID}/{SubId} for BUSINESS/ALIAS/DEVICE Types", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "pathParams", + "operator": "in", + "value": "BUSINESS,ALIAS,DEVICE", + "path": "Type" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 53, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID} for BUSINESS/ALIAS/DEVICE Types", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "pathParams", + "operator": "in", + "value": "BUSINESS,ALIAS,DEVICE", + "path": "Type" + }, + { + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + }, + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 54, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID} ACCOUNT_ID", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "pathParams", + "operator": "equal", + "path": "Type", + "value": "ACCOUNT_ID" + }, + { + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + }, + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 55, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "ttkpayeefsp" + } + } + }, + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Nm": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "version": 1, + "ruleId": 56, + "priority": 1, + "description": "ISO20022 get /quotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "ruleId": 57, + "priority": 1, + "description": "ISO20022 post /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.quotes+json;version=2.0", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "PmtInstrXpryDtTm": "{$environment.PmtInstrXpryDtTm}", + "CreDtTm": "{$environment.CreDtTm}", + "NbOfTxs": "1", + "SttlmInf": { + "SttlmMtd": "CLRG" + } + }, + "CdtTrfTxInf": { + "VrfctnOfTerms": { + "Sh256Sgntr": "R1J6TGFUUDdESjl0NFAtYV9CQTBXQTl3enpsc3VnZjAwLVRuNmtFU0FmTQ==" + }, + "PmtId": { + "TxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "EndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}" + }, + "IntrBkSttlmAmt": { + "Ccy": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.Ccy}", + "ActiveCurrencyAndAmount": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount}" + }, + "InstdAmt": { + "Ccy": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.Ccy}", + "ActiveOrHistoricCurrencyAndAmount": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount}" + }, + "ChrgBr": "SHAR", + "ChrgsInf": { + "Amt": { + "Ccy": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.Ccy}", + "ActiveOrHistoricCurrencyAndAmount": "0" + }, + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "123456789", + "SchmeNm": { + "Cd": "BBA", + "Prtry": "Party Identification Scheme Name" + } + } + } + } + }, + "Cdtr": { + "Nm": "{$request.body.CdtTrfTxInf.Cdtr.Nm}", + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.Id.OrgId.Othr.Id}", + "SchmeNm": { + "Prtry": "{$request.body.CdtTrfTxInf.Cdtr.Id.OrgId.Othr.SchmeNm.Prtry}" + } + } + } + } + }, + "Dbtr": { + "Nm": "{$request.body.CdtTrfTxInf.Dbtr.Nm}", + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.Id.OrgId.Othr.Id}", + "SchmeNm": { + "Prtry": "{$request.body.CdtTrfTxInf.Dbtr.Id.OrgId.Othr.SchmeNm.Prtry}" + } + } + } + } + }, + "DbtrAgt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers['FSPIOP-Source']}", + "SchmeNm": { + "Cd": "BDID" + } + } + } + }, + "CdtrAgt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers['FSPIOP-Destination']}", + "SchmeNm": { + "Cd": "BDID" + } + } + } + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "ruleId": 58, + "priority": 1, + "description": "ISO20022 get /transfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + }, + "version": 1 + }, + { + "ruleId": 59, + "priority": 1, + "description": "ISO20022 post /transfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "OrgnlEndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}", + "OrgnlTxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "COMM", + "StsRsnInf": { + "Rsn": { + "Prtry": "COMM" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "PrcgDt": { + "Dt": "{$environment.AccptncDtTm}" + }, + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 60, + "priority": 1, + "description": "ISO20022 get /fxQuotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.fxQuotes+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 61, + "priority": 1, + "description": "ISO20022 post /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.fxQuotes+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}", + "PmtInstrXpryDtTm": "{$environment.PmtInstrXpryDtTm}", + "NbOfTxs": "1", + "SttlmInf": { + "SttlmMtd": "CLRG" + } + }, + "CdtTrfTxInf": { + "VrfctnOfTerms": { + "Sh256Sgntr": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM" + }, + "PmtId": { + "TxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "InstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "EndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}" + }, + "PmtTpInf": { + "InstrPrty": "NORM", + "CtgyPurp": { + "Cd": "SUPP" + } + }, + "InstrForCdtrAgt": { + "InstrInf": "{$request.body.CdtTrfTxInf.InstrForCdtrAgt.InstrInf}" + }, + "UndrlygCstmrCdtTrf": { + "InstdAmt": { + "Ccy": "{$request.body.CdtTrfTxInf.UndrlygCstmrCdtTrf.InstdAmt.Ccy}", + "ActiveOrHistoricCurrencyAndAmount": "{$request.body.CdtTrfTxInf.UndrlygCstmrCdtTrf.InstdAmt.ActiveOrHistoricCurrencyAndAmount}" + }, + "Dbtr": { + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.Id.OrgId.Othr.Id}" + } + } + } + }, + "Cdtr": { + "Id": { + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.Id.OrgId.Othr.Id}" + } + } + } + }, + "CdtrAgt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.Id.OrgId.Othr.Id}" + } + } + }, + "DbtrAgt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.Id.OrgId.Othr.Id}" + } + } + } + }, + "IntrBkSttlmAmt": { + "ActiveCurrencyAndAmount": "100", + "Ccy": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.Ccy}" + }, + "ChrgBr": "SLEV", + "Cdtr": { + "Name": "Test Creditor", + "FinInstnId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.FinInstnId.Othr.Id}" + } + }, + "Id": { + "PrvtId": { + "DtAndPlcOfBirth": { + "BirthDt": "{$function.generic.curDate}" + } + }, + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.Id.OrgId.Othr.Id}", + "SchmeNm": { + "Prtry": "ACCOUNT_ID" + } + } + } + } + }, + "CdtrAcct": { + "Id": { + "IBAN": "BE71096123456769" + }, + "Tp": { + "Cd": "CACC" + }, + "Ccy": "XTS", + "Nm": "My account" + }, + "CdtrAgt": { + "FinInstnId": { + "BICFI": "BNBABEBB" + } + }, + "CdtrAgtAcct": { + "Id": { + "IBAN": "BE71096123456769" + }, + "Tp": { + "Cd": "CACC" + }, + "Ccy": "XTS", + "Nm": "My account" + }, + "Dbtr": { + "Name": "Test Debitor", + "FinInstnId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.FinInstnId.Othr.Id}" + } + }, + "Id": { + "PrvtId": { + "DtAndPlcOfBirth": { + "BirthDt": "{$function.generic.curDate}" + } + }, + "OrgId": { + "Othr": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.Id.OrgId.Othr.Id}", + "SchmeNm": { + "Prtry": "ACCOUNT_ID" + } + } + } + } + }, + "DbtrAcct": { + "Id": { + "IBAN": "BE71096123456769" + }, + "Tp": { + "Cd": "CACC" + }, + "Ccy": "XTS", + "Nm": "My account" + }, + "DbtrAgt": { + "FinInstnId": { + "BICFI": "BNBABEBB" + } + }, + "DbtrAgtAcct": { + "Id": { + "IBAN": "BE71096123456769" + }, + "Tp": { + "Cd": "CACC" + }, + "Ccy": "XTS", + "Nm": "My account" + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 62, + "priority": 1, + "description": "ISO20022 get /fxTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.fxTransfers+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 63, + "priority": 1, + "description": "ISO20022 post /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "exec": [ + "environment.CreDtTm = new Date().toISOString()", + "environment.AccptncDtTm = new Date().toISOString()", + "environment.PmtInstrXpryDtTm = new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.fxTransfers+json;version=2.0", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$environment.CreDtTm}" + }, + "TxInfAndSts": { + "StsId": "12345", + "OrgnlInstrId": "12345", + "OrgnlEndToEndId": "12345", + "OrgnlTxId": "12345", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RESV", + "StsRsnInf": { + "Rsn": { + "Prtry": "ACPT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$environment.AccptncDtTm}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 199, + "priority": 1, + "description": "get /parties/{Type}/{ID} for ttkpayeefsp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "5671234", + "path": "ID" + }, + { + "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": "ttkpayeefsp", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "party": { + "partyIdInfo": { + "fspId": "ttkpayeefsp" + }, + "merchantClassificationCode": null, + "name": "Justin Pierre", + "personalInfo": { + "complexName": { + "firstName": "Justin", + "middleName": "Pierre", + "lastName": "Trudeau" + }, + "dateOfBirth": "1971-12-25" + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 219, + "priority": 1, + "description": "ttkpayeefsp PUT Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "104", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "FSPIOP-Destination": "doesnotexistfsp" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 220, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid fulfilment", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "103", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "body": { + "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "RESERVED", + "extensionList": null + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 221, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "102", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "FSPIOP-Destination": "doesnotexistfsp" + }, + "body": { + "transferState": "RESERVED" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 222, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Success Test-case", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "101", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "body": { + "transferState": "RESERVED" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 223, + "priority": 1, + "description": "get /parties/{Type}/{ID} for pinkbank", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "pinkbankfsp", + "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": "greenbankfsp" + }, + "body": { + "party": { + "partyIdInfo": { + "fspId": "greenbankfsp" + }, + "merchantClassificationCode": null, + "name": "Justin Pierre", + "personalInfo": { + "complexName": { + "firstName": "Justin", + "middleName": "Pierre", + "lastName": "Trudeau" + }, + "dateOfBirth": "1971-12-25" + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 224, + "priority": 1, + "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": 225, + "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=2.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": 226, + "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=2.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": 227, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "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" + }, + "body": { + "party": { + "partyIdInfo": { + "partySubIdOrType": null + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 228, + "priority": 1, + "description": "post /quotes - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "body": { + "transferAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quoteTransferAmount}" + }, + "payeeReceiveAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeReceiveAmount}" + }, + "payeeFspFee": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeFspFee}" + }, + "payeeFspCommission": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeFspCommission}" + }, + "expiration": "{$environment.quoteExpiration}" + }, + "scripts": { + "exec": [ + "const quoteBody = JSON.parse(request.body)", + "environment.quoteTransferAmount = quoteBody.amount.amount", + "environment.quotePayeeFspFee = 0.2", + "environment.quotePayeeFspCommission = 0.3", + "environment.quotePayeeReceiveAmount = quoteBody.amount.amount", + "if (quoteBody.amountType === 'RECEIVE') {", + " environment.quoteTransferAmount = (+quoteBody.amount.amount) + environment.quotePayeeFspFee + environment.quotePayeeFspCommission", + "}", + "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": "callback", + "version": 1 + }, + { + "ruleId": 229, + "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 + }, + { + "ruleId": 230, + "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": 231, + "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": 232, + "priority": 1, + "description": "post /transfers - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 233, + "priority": 1, + "description": "post /transactionRequests - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": { + "body": { + "transactionRequestState": "RECEIVED" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "version": 1, + "ruleId": 234, + "priority": 1, + "description": "get /quotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 235, + "priority": 1, + "description": "get /participants/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 236, + "priority": 1, + "description": "post /participants/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 237, + "priority": 1, + "description": "get /participants/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 238, + "priority": 1, + "description": "post /participants/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 239, + "priority": 1, + "description": "post /participants", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 240, + "priority": 1, + "description": "get /parties/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 241, + "priority": 1, + "description": "get /transactionRequests/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 242, + "priority": 1, + "description": "get /authorizations/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/authorizations/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/authorizations/{ID}", + "params": { + "body": { + "responseType": "ENTERED" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 243, + "priority": 1, + "description": "get /transfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 244, + "priority": 1, + "description": "get /transactions/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactions/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactions/{ID}", + "params": { + "body": { + "transactionState": "COMPLETED" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 245, + "priority": 1, + "description": "get /bulkQuotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 246, + "priority": 1, + "description": "post /bulkQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 247, + "priority": 1, + "description": "get /bulkTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 248, + "priority": 1, + "description": "post /bulkTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "ruleId": 249, + "priority": 1, + "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" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}", + "params": { + "scripts": { + "exec": [ + "const fxQuoteBody = JSON.parse(request.body)", + "environment.sourceAmountValue = fxQuoteBody.conversionTerms.sourceAmount.amount || 500", + "environment.targetAmountValue = fxQuoteBody.conversionTerms.targetAmount.amount || 500" + ], + "scriptingEngine": "javascript" + }, + "body": { + "condition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "conversionTerms": { + "conversionId": "{$request.body.conversionTerms.conversionId}", + "determiningTransferId": "{$request.body.conversionTerms.determiningTransferId}", + "initiatingFsp": "{$request.body.conversionTerms.initiatingFsp}", + "counterPartyFsp": "{$request.body.conversionTerms.counterPartyFsp}", + "amountType": "{$request.body.conversionTerms.amountType}", + "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": "2025-12-25T14:17:09.663+01:00" + } + }, + "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 + }, + { + "ruleId": 250, + "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": 251, + "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": 252, + "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": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "completedTimestamp": "{$environment.completedTimestamp}", + "conversionState": "RESERVED" + }, + "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 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..2922986f --- /dev/null +++ b/rules/hub/rules_validation/default.json @@ -0,0 +1,2990 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "ISO20022 FxQuotes generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "body", + "operator": "equal", + "value": "13", + "path": "CdtTrfTxInf.UndrlygCstmrCdtTrf.InstdAmt.ActiveOrHistoricCurrencyAndAmount" + }, + { + "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": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "2000" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 2, + "priority": 1, + "description": "ISO20022 fxTransfers generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "body", + "operator": "equal", + "value": "13", + "path": "CdtTrfTxInf.UndrlygCstmrCdtTrf.InstdAmt.ActiveOrHistoricCurrencyAndAmount" + }, + { + "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": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "2000" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 3, + "priority": 1, + "description": "ISO20022 transfers generic error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_2.0_iso20022/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0_iso20022/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "includesString", + "value": "application/vnd.interoperability.iso20022", + "path": "Accept" + }, + { + "fact": "body", + "operator": "equal", + "value": "13", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "2000" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 50, + "priority": 1, + "description": "ISO20022 get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as ISPA - Negative Scenario - Party Not Found in Proxy 2 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": "123456", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "headers", + "operator": "equal", + "value": "proxyispa", + "path": "FSPIOP-Proxy" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "FSPIOP-Source": "nonexistentpayeefsp", + "Date": "{$request.headers.date}", + "FSPIOP-Destination": "testingtoolkitdfsp", + "FSPIOP-Proxy": "proxyispa" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "nonexistentpayeefsp" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "3100" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "FSPIOP-Source": "proxyttk", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "3100" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "FSPIOP-Source": "proxyttk", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "3100" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 52, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "2001" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 53, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "3001" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 54, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "4001" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 55, + "priority": 1, + "description": "ISO20022 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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "5001" + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 56, + "priority": 1, + "description": "ISO20022 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": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "5101" + } + } + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp" + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 57, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "3100" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 58, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "2001" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 59, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "3001" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 60, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "4001" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 61, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "5001" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 62, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "5101" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 63, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "3100" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 64, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "3100" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 65, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "proxyttk", + "FSPIOP-Destination": "testingtoolkitdfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "3100" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 66, + "priority": 1, + "description": "ISO20022 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": { + "Assgnmt": { + "MsgId": "/parties/{$request.params.Type}/{$request.params.ID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$config.FSPID}" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": false, + "Rsn": { + "Cd": "5201" + } + } + }, + "headers": { + "Content-Type": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 67, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.Cdtr.Id.PrvtId.Othr.Id" + }, + { + "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": "{$request.headers.content-type}", + "Date": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "5201" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 68, + "priority": 1, + "description": "ISO20022 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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": "Tue, 23 Jul 2024 02:05:53 GMT", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsRsnInf": { + "Rsn": { + "Cd": "5201" + } + } + } + } + }, + "type": "FIXED_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + }, + { + "ruleId": 501, + "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=2.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": 502, + "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=2.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": 503, + "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=2.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": 504, + "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=2.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": 505, + "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=2.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": 506, + "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=2.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": 507, + "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": 508, + "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": 509, + "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": 510, + "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": 511, + "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": 512, + "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": 513, + "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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "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": 514, + "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": 515, + "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": 516, + "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=2.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": 517, + "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": 518, + "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": 519, + "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": 520, + "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": 521, + "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_callback/default.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json deleted file mode 100644 index 8d85d9aa..00000000 --- a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default.json +++ /dev/null @@ -1,2159 +0,0 @@ -[ - { - "ruleId": 31, - "priority": 1, - "description": "post /participants/{Type}/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 32, - "priority": 1, - "description": "get /participants/{Type}/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 33, - "priority": 1, - "description": "post /participants/{Type}/{ID}/{SubId} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}/{SubId}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 34, - "priority": 1, - "description": "get /participants/{Type}/{ID}/{SubId} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}/{SubId}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 35, - "priority": 1, - "description": "post /participants - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 36, - "priority": 1, - "description": "get /parties/{Type}/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "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" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 37, - "priority": 1, - "description": "get /parties/{Type}/{ID}/{SubId} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/parties/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/parties/{Type}/{ID}/{SubId}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 38, - "priority": 1, - "description": "post /transactionRequests - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactionRequests" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transactionRequests/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 39, - "priority": 1, - "description": "get /transactionRequests/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactionRequests/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transactionRequests/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 40, - "priority": 1, - "description": "post /quotes - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/quotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/quotes/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 41, - "priority": 1, - "description": "get /quotes/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/quotes/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/quotes/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 42, - "priority": 1, - "description": "get /authorizations/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/authorizations/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/authorizations/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 43, - "priority": 1, - "description": "post /transfers - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "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": 44, - "priority": 1, - "description": "get /transfers/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 45, - "priority": 1, - "description": "get /transactions/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactions/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transactions/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 46, - "priority": 1, - "description": "post /bulkQuotes - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkQuotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkQuotes/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 47, - "priority": 1, - "description": "get /bulkQuotes/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkQuotes/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkQuotes/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 48, - "priority": 1, - "description": "post /bulkTransfers - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkTransfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkTransfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 49, - "priority": 1, - "description": "get /bulkTransfers/{ID} - No callback", - "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" - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "noresponsepayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkTransfers/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkTransfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "NO_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 30, - "priority": 1, - "description": "ttkpayeefsp PUT Notifications Failure Test-case due to invalid FSPIOP-Destination", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "testingtoolkitdfsp", - "path": "FSPIOP-Source" - }, - { - "fact": "headers", - "operator": "equal", - "value": "ttkpayeefsp", - "path": "FSPIOP-Destination" - }, - { - "fact": "body", - "operator": "numericEqual", - "value": "104", - "path": "amount.amount" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": { - "headers": { - "FSPIOP-Destination": "doesnotexistfsp" - }, - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 29, - "priority": 1, - "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid fulfilment", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "testingtoolkitdfsp", - "path": "FSPIOP-Source" - }, - { - "fact": "headers", - "operator": "equal", - "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", - "value": "103", - "path": "amount.amount" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": { - "body": { - "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", - "completedTimestamp": "{$function.generic.curDateISO}", - "transferState": "RESERVED", - "extensionList": null - }, - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 28, - "priority": 1, - "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid FSPIOP-Destination", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "testingtoolkitdfsp", - "path": "FSPIOP-Source" - }, - { - "fact": "headers", - "operator": "equal", - "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", - "value": "102", - "path": "amount.amount" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": { - "headers": { - "FSPIOP-Destination": "doesnotexistfsp" - }, - "body": { - "transferState": "RESERVED" - }, - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 27, - "priority": 1, - "description": "ttkpayeefsp PATCH Notifications Success Test-case", - "apiVersion": { - "minorVersion": 1, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "testingtoolkitdfsp", - "path": "FSPIOP-Source" - }, - { - "fact": "headers", - "operator": "equal", - "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", - "value": "101", - "path": "amount.amount" - }, - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": { - "body": { - "transferState": "RESERVED" - }, - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 20, - "priority": 1, - "description": "get /parties/{Type}/{ID} for pinkbank", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "headers", - "operator": "equal", - "value": "pinkbankfsp", - "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=1.0", - "FSPIOP-Source": "greenbankfsp" - }, - "body": { - "party": { - "partyIdInfo": { - "fspId": "greenbankfsp" - }, - "merchantClassificationCode": null, - "name": "Justin Pierre", - "personalInfo": { - "complexName": { - "firstName": "Justin", - "middleName": "Pierre", - "lastName": "Trudeau" - }, - "dateOfBirth": "1971-12-25" - } - } - }, - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "ruleId": 1, - "priority": 1, - "description": "get /parties/{Type}/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "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=1.0" - }, - "body": { - "party": { - "partyIdInfo": { - "partySubIdOrType": null - } - } - }, - "scripts": {} - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - }, - { - "type": "callback", - "version": 1, - "ruleId": 2, - "priority": 1, - "description": "post /quotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/quotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/quotes/{ID}", - "params": { - "body": { - "transferAmount": { - "currency": "{$request.body.amount.currency}", - "amount": "{$environment.quoteTransferAmount}" - }, - "payeeReceiveAmount": { - "currency": "{$request.body.amount.currency}", - "amount": "{$environment.quotePayeeReceiveAmount}" - }, - "payeeFspFee": { - "currency": "{$request.body.amount.currency}", - "amount": "{$environment.quotePayeeFspFee}" - }, - "payeeFspCommission": { - "currency": "{$request.body.amount.currency}", - "amount": "{$environment.quotePayeeFspCommission}" - }, - "expiration": "{$environment.quoteExpiration}" - }, - "scripts": { - "exec": [ - "const quoteBody = JSON.parse(request.body)", - "environment.quoteTransferAmount = quoteBody.amount.amount", - "environment.quotePayeeFspFee = 0.2", - "environment.quotePayeeFspCommission = 0.3", - "environment.quotePayeeReceiveAmount = quoteBody.amount.amount", - "if (quoteBody.amountType === 'RECEIVE') {", - " environment.quoteTransferAmount = (+quoteBody.amount.amount) + environment.quotePayeeFspFee + environment.quotePayeeFspCommission", - "}", - "environment.quoteExpiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" - ], - "scriptingEngine": "javascript" - } - }, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 3, - "priority": 1, - "description": "post /transfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 4, - "priority": 1, - "description": "post /transactionRequests", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactionRequests" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/transactionRequests/{ID}", - "params": { - "body": { - "transactionRequestState": "RECEIVED" - } - }, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 5, - "priority": 1, - "description": "get /quotes/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/quotes/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/quotes/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 6, - "priority": 1, - "description": "get /participants/{Type}/{ID}/{SubId}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}/{SubId}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 7, - "priority": 1, - "description": "post /participants/{Type}/{ID}/{SubId}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}/{SubId}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 8, - "priority": 1, - "description": "get /participants/{Type}/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 9, - "priority": 1, - "description": "post /participants/{Type}/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants/{Type}/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{Type}/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 10, - "priority": 1, - "description": "post /participants", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/participants" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/participants/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 11, - "priority": 1, - "description": "get /parties/{Type}/{ID}/{SubId}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/parties/{Type}/{ID}/{SubId}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/parties/{Type}/{ID}/{SubId}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 12, - "priority": 1, - "description": "get /transactionRequests/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactionRequests/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transactionRequests/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 13, - "priority": 1, - "description": "get /authorizations/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/authorizations/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/authorizations/{ID}", - "params": { - "body": { - "responseType": "ENTERED" - } - }, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 14, - "priority": 1, - "description": "get /transfers/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transfers/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transfers/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 15, - "priority": 1, - "description": "get /transactions/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/transactions/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/transactions/{ID}", - "params": { - "body": { - "transactionState": "COMPLETED" - } - }, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 16, - "priority": 1, - "description": "get /bulkQuotes/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkQuotes/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": null, - "path": null, - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 17, - "priority": 1, - "description": "post /bulkQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkQuotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkQuotes/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 18, - "priority": 1, - "description": "get /bulkTransfers/{ID}", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkTransfers/{ID}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": null, - "path": null, - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "type": "callback", - "version": 1, - "ruleId": 19, - "priority": 1, - "description": "post /bulkTransfers", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 1, - "type": "fspiop", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/bulkTransfers" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "path": "/bulkTransfers/{ID}", - "params": {}, - "delay": 0, - "type": "MOCK_CALLBACK" - } - }, - { - "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, - "priority": 1, - "description": "post /fxQuotes", - "apiVersion": { - "minorVersion": 0, - "majorVersion": 2, - "type": "fx-api", - "asynchronous": true - }, - "conditions": { - "all": [ - { - "fact": "operationPath", - "operator": "equal", - "value": "/fxQuotes" - }, - { - "fact": "method", - "operator": "equal", - "value": "post" - } - ] - }, - "event": { - "method": "put", - "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" - }, - { - "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}" - }, - { - "fact": "method", - "operator": "equal", - "value": "get" - } - ] - }, - "event": { - "method": "put", - "path": "/fxTransfers/{ID}", - "params": { - "scripts": { - "scriptingEngine": "postman" - } - }, - "type": "MOCK_CALLBACK" - }, - "type": "callback", - "version": 1 - } -] 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/forex/rules_sync_response/fxp_response_rules.json b/rules/pm4ml/forex/rules_sync_response/fxp_response_rules.json new file mode 100644 index 00000000..b9e26b5d --- /dev/null +++ b/rules/pm4ml/forex/rules_sync_response/fxp_response_rules.json @@ -0,0 +1,882 @@ +[ + { + "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" + } + }, + "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}" + }, + "targetAmount": { + "currency": "{$request.body.conversionTerms.targetAmount.currency}" + } + }, + "homeTransactionId": "homeTransactionId-123" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "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": "{$request.body.conversionTerms.determiningTransferId}", + "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 = 5", + "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": 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" + } + }, + "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" + }, + { + "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": "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" + } + }, + "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": "Chikondi Banda", + "firstName": "Chikondi", + "fspId": "testpayee", + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "lastName": "Banda", + "merchantClassificationCode": "1234", + "middleName": "", + "kycInformation": "This is encrypted KYC information" + }, + "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}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.currency}", + "payeeReceiveAmount": "{$request.body.amount}", + "payeeReceiveAmountCurrency": "{$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()", + "", + "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" + } + }, + "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/fxp_response_rules.json deleted file mode 100644 index 14a3a8af..00000000 --- a/rules/pm4ml/fxp_response_rules.json +++ /dev/null @@ -1,547 +0,0 @@ -[ - { - "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" - }, - "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/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