diff --git a/LICENSE.md b/LICENSE.md index ea7dac99..d28c9d19 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,9 @@ # LICENSE -Copyright © 2021 Mojaloop Foundation +Copyright © 2020-2024 Mojaloop Foundation -The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 -(the "License") and you may not use these files except in compliance with the [License](http://www.apache.org/licenses/LICENSE-2.0). +The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. -You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the [License](http://www.apache.org/licenses/LICENSE-2.0). +Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/collections/hub/provisioning/new_participants/new_dfsp.json b/collections/hub/provisioning/new_participants/new_dfsp.json index 2b64d01f..09b48ff7 100644 --- a/collections/hub/provisioning/new_participants/new_dfsp.json +++ b/collections/hub/provisioning/new_participants/new_dfsp.json @@ -91,6 +91,51 @@ } ] } + }, + { + "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)", + "}" + ] + } + ] + } } ] }, diff --git a/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default_iso.json b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default_iso.json new file mode 100644 index 00000000..20739f83 --- /dev/null +++ b/rules/mojaloop/ml-testing-toolkit/spec_files/rules_callback/default_iso.json @@ -0,0 +1,2141 @@ +[ + { + "ruleId": 31, + "priority": 1, + "description": "post /participants/{Type}/{ID} - No callback", + "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": "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": 36, + "priority": 1, + "description": "get /parties/{Type}/{ID} - No callback", + "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": "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": 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": "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": 40, + "priority": 1, + "description": "post /quotes - No callback", + "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": "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": 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": "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": 43, + "priority": 1, + "description": "post /transfers - No callback", + "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": "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": 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": "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": 30, + "priority": 1, + "description": "ttkpayeefsp PUT Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "FSPIOP-Destination": "doesnotexistfsp" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 29, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$function.generic.generateULID}", + "OrgnlEndToEndId": "{$function.generic.generateULID}", + "OrgnlTxId": "{$function.generic.generateULID}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "ACPT", + "StsRsnInf": { + "Rsn": { + "Prtry": "ACPT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 28, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "FSPIOP-Destination": "doesnotexistfsp", + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$function.generic.generateULID}", + "OrgnlEndToEndId": "{$function.generic.generateULID}", + "OrgnlTxId": "{$function.generic.generateULID}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "ACPT", + "StsRsnInf": { + "Rsn": { + "Prtry": "ACPT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 27, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Success Test-case", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "TxInfAndSts": { + "StsId": "{$function.generic.generateULID}", + "OrgnlInstrId": "{$function.generic.generateULID}", + "OrgnlEndToEndId": "{$function.generic.generateULID}", + "OrgnlTxId": "{$function.generic.generateULID}", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "ACPT", + "StsRsnInf": { + "Rsn": { + "Prtry": "ACPT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 20, + "priority": 1, + "description": "get /parties/{Type}/{ID} for pinkbank", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "greenbankfsp", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "greenbankfsp" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Name": "Justin Pierre", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 21, + "priority": 1, + "description": "get /parties/{Type}/{ID} for ttkfxpayer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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.iso20022.parties+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "ttkfxpayee", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "ttkfxpayee" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/{$request.params.Type}/{$request.params.ID}", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Name": "Justin Pierre", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 50, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payer Scheme with Payee side Proxy as TTK - Happy Path", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "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": "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.iso20022.parties+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "nonexistentpayeefsp", + "FSPIOP-Destination": "testingtoolkitdfsp", + "fspiop-proxy": "proxyttk" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "nonexistentpayeefsp" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/MSISDN/123456", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Name": "Justin Pierre", + "Id": { + "PrvtId": { + "Othr": { + "Id": "123456", + "SchmeNm": { + "Prtry": "MSISDN" + } + } + } + } + } + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Testing Payee side scheme with Payer side proxy as TTK and Payee DFSP as proxy", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "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": "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.iso20022.parties+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "ttkpayeefsp", + "FSPIOP-Destination": "nonexistentpayerfsp" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}", + "Assgnr": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "{$request.headers.fspiop-source}" + } + } + } + }, + "Assgne": { + "Agt": { + "FinInstnId": { + "Othr": { + "Id": "payeefspproxyttk" + } + } + } + } + }, + "Rpt": { + "OrgnlId": "/parties/MSISDN/7891234", + "Vrfctn": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Name": "veniam consectetur officia si", + "Id": { + "PrvtId": { + "Othr": { + "Id": "7891234", + "SchmeNm": { + "Prtry": "MSISDN" + } + } + } + } + } + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 22, + "priority": 1, + "description": "get /parties/{Type}/{ID} - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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.iso20022.parties+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "Assgnmt": { + "MsgId": "{$function.generic.generateULID}", + "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": true, + "UpdtdPtyAndAcctId": { + "Acct": { + "Ccy": "XTS" + }, + "Pty": { + "Name": "Test Party", + "Id": { + "PrvtId": { + "Othr": { + "Id": "{$request.params.ID}", + "SchmeNm": { + "Prtry": "{$request.params.Type}" + } + } + } + } + } + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 2, + "priority": 1, + "description": "post /quotes - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.quotes+json;version=2.0", + "Date": "{$request.headers.date}", + "FSPIOP-Source": "{$request.headers.fspiop-destination}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "PmtInstrXpryDtTm": "{$function.generic.curDateISO}", + "CreDtTm": "{$function.generic.curDateISO}", + "NbOfTxs": "1", + "SttlmInf": { + "SttlmMtd": "CLRG" + }, + "CtrlSum": "100", + "InitgPty": { + "Nm": "Initiating Party Name", + "Id": { + "OrgId": { + "Othr": [ + { + "Id": "123456789", + "SchmeNm": { + "Cd": "BBA", + "Prtry": "Party Identification Scheme Name" + } + } + ] + } + } + }, + "FwdgAgt": { + "FinInstnId": { + "BICFI": "BBBBBBBB" + } + } + }, + "CdtTrfTxInf": { + "VrfctnOfTerms": { + "IlpV4PrepPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA" + }, + "PmtId": { + "TxId": "{$request.body.CdtTrfTxInf.PmtId.TxId}", + "InstrId": "{$request.body.CdtTrfTxInf.PmtId.InstrId}", + "EndToEndId": "{$request.body.CdtTrfTxInf.PmtId.EndToEndId}" + }, + "PmtTpInf": { + "InstrPrty": "NORM", + "SvcLvl": { + "Cd": "SEPA" + }, + "LclInstrm": { + "Cd": "CH03" + }, + "CtgyPurp": { + "Cd": "SUPP" + } + }, + "IntrBkSttlmAmt": { + "Ccy": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.Ccy}", + "ActiveCurrencyAndAmount": "{$request.body.CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount}" + }, + "InstdAmt": { + "Ccy": "{$request.body.CdtTrfTxInf.InstdAmt.Ccy}", + "ActiveOrHistoricCurrencyAndAmount": "{$request.body.CdtTrfTxInf.InstdAmt.ActiveOrHistoricCurrencyAndAmount}" + }, + "ChrgBr": "SLEV", + "ChrgsInf": { + "Amt": { + "Ccy": "{$request.body.CdtTrfTxInf.ChrgsInf.Amt.Ccy}", + "ActiveOrHistoricCurrencyAndAmount": "{$request.body.CdtTrfTxInf.ChrgsInf.Amt.ActiveOrHistoricCurrencyAndAmount}" + }, + "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" + } + } + } + }, + "DbtrAcct": { + "Id": { + "IBAN": "{$request.body.CdtTrfTxInf.DbtrAcct.Id.IBAN}", + "Ccy": "{$request.body.CdtTrfTxInf.DbtrAcct.Id.Ccy}" + } + }, + "DbtrAgtAcct": { + "Id": { + "IBAN": "{$request.body.CdtTrfTxInf.DbtrAgtAcct.Id.IBAN}", + "Ccy": "{$request.body.CdtTrfTxInf.DbtrAgtAcct.Id.Ccy}" + } + }, + "CdtrAcct": { + "Id": { + "IBAN": "{$request.body.CdtTrfTxInf.CdtrAcct.Id.IBAN}", + "Ccy": "{$request.body.CdtTrfTxInf.CdtrAcct.Id.Ccy}" + } + }, + "CdtrAgtAcct": { + "Id": { + "IBAN": "{$request.body.CdtTrfTxInf.CdtrAgtAcct.Id.IBAN}", + "Ccy": "{$request.body.CdtTrfTxInf.CdtrAgtAcct.Id.Ccy}" + } + }, + "UltmtCdtr": { + "Nm": "Ultimate Creditor Name", + "PstlAdr": { + "AdrTp": { + "Cd": "ADDR" + }, + "Dept": "Department", + "SubDept": "SubDepartment", + "StrtNm": "StreetName", + "BldgNb": "BuildingNumber", + "PstCd": "PostCode", + "TwnNm": "TownName", + "CtrySubDvsn": "CountrySubDivision", + "Ctry": "AZ" + }, + "Id": { + "OrgId": { + "AnyBIC": "BBBBBBBB", + "Othr": { + "Id": "123456789", + "SchmeNm": { + "Cd": "IBAN", + "Prtry": "Party Identification Scheme Name" + } + } + } + } + }, + "RgltryRptg": { + "DbtCdtRptgInd": "CRED", + "Authrty": { + "Nm": "Swiss National Bank", + "Ctry": "CH" + } + } + } + }, + "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": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 53, + "priority": 1, + "description": "Post /transfers - 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": "numericEqual", + "value": "15", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "javascript" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "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": "COMT", + "StsRsnInf": { + "Rsn": { + "Prtry": "COMT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 57, + "priority": 1, + "description": "Post /transfers No callback", + "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": "numericEqual", + "value": "16", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 56, + "priority": 1, + "description": "Post /transfers matching fulfilment", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "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": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "path": "CdtTrfTxInf.VrfctnOfTerms.IlpV4PrepPacket" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.transfers+json;version=2.0", + "FSPIOP-Source": "{$config.FSPID}", + "Date": "{$request.headers.date}" + }, + "body": { + "GrpHdr": { + "MsgId": "{$function.generic.generateULID}", + "CreDtTm": "{$function.generic.curDateISO}" + }, + "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": "COMT", + "StsRsnInf": { + "Rsn": { + "Prtry": "COMT" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 3, + "priority": 1, + "description": "post /transfers - Default", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "version": 1, + "ruleId": 5, + "priority": 1, + "description": "get /quotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "FIXED_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 11, + "priority": 1, + "description": "get /parties/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "FIXED_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 14, + "priority": 1, + "description": "get /transfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "iso20022", + "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": "FIXED_CALLBACK" + } + }, + { + "ruleId": 50, + "priority": 1, + "description": "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": "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" + }, + "headers": { + "Content-Type": "application/vnd.interoperability.iso20022.fxQuotes+json;version=2.0", + "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}", + "NbOfTxs": "1", + "CtrlSum": "100", + "InitgPty": { + "Nm": "Initiating Party Name" + }, + "MsgRcpt": { + "Nm": "Message Recipient Name" + }, + "SttlmInf": { + "SttlmMtd": "CLRG" + } + }, + "CdtTrfTxInf": { + "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" + } + }, + "IntrBkSttlmAmt": { + "ActiveCurrencyAndAmount": "100", + "Ccy": "XTS" + }, + "ChrgBr": "SLEV", + "Cdtr": { + "Name": "Test Creditor", + "FinInstnId": { + "Id": "{$request.body.CdtTrfTxInf.Cdtr.FinInstnId.Id}", + "SchmeNm": { + "Prtry": "ACCOUNT_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": { + "Id": "{$request.body.CdtTrfTxInf.Dbtr.FinInstnId.Id}", + "SchmeNm": { + "Prtry": "ACCOUNT_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" + }, + "RmtInf": { + "Ustrd": "Remittance Information" + }, + "RgltryRptg": { + "Dbtr": { + "Nm": "Debtor Name" + }, + "DbtrAcct": { + "Id": { + "IBAN": "BE71096123456769" + }, + "Tp": { + "Cd": "CACC" + }, + "Ccy": "XTS", + "Nm": "My account" + } + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 54, + "priority": 1, + "description": "post /fxTransfers - 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": "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": "application/vnd.interoperability.iso20022.fxTransfers+json;version=2.0", + "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": { + "StsId": "12345", + "OrgnlInstrId": "12345", + "OrgnlEndToEndId": "12345", + "OrgnlTxId": "12345", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RSVD", + "StsRsnInf": { + "Rsn": { + "Prtry": "RSVD" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "AelJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 55, + "priority": 1, + "description": "post /fxTransfers No callback", + "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": "numericEqual", + "value": "16", + "path": "CdtTrfTxInf.IntrBkSttlmAmt.ActiveOrHistoricCurrencyAndAmount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "NO_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 51, + "priority": 1, + "description": "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": "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": "application/vnd.interoperability.iso20022.fxTransfers+json;version=2.0", + "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": { + "StsId": "12345", + "OrgnlInstrId": "12345", + "OrgnlEndToEndId": "12345", + "OrgnlTxId": "12345", + "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000", + "TxSts": "RSVD", + "StsRsnInf": { + "Rsn": { + "Prtry": "RSVD" + }, + "AddtlInf": "ADDITIONAL" + }, + "AccptncDtTm": "{$function.generic.curDateISO}", + "AcctSvcrRef": "ACCTSVCRREF", + "ClrSysRef": "CLRSYSREF", + "ExctnConf": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "SplmtryData": { + "PlcAndNm": "PLACE", + "Envlp": {} + } + } + } + }, + "type": "FIXED_CALLBACK" + }, + "type": "callback", + "version": 1 + } +]