From cb995e7fdd820817b1aeaef21fd7854872bf2074 Mon Sep 17 00:00:00 2001 From: RiccardoGiuliani <144138935+RiccardoGiuliani@users.noreply.github.com> Date: Tue, 14 May 2024 14:52:35 +0200 Subject: [PATCH] chore: [MCIL-22, MCIL-42] postman update/delete terminal (#40) --- ...-terminal-registry.postman_collection.json | 117 ++++++++++++++++-- 1 file changed, 106 insertions(+), 11 deletions(-) diff --git a/src/test/postman/mil-terminal-registry.postman_collection.json b/src/test/postman/mil-terminal-registry.postman_collection.json index 3ab44bf..47a7fe3 100644 --- a/src/test/postman/mil-terminal-registry.postman_collection.json +++ b/src/test/postman/mil-terminal-registry.postman_collection.json @@ -1,10 +1,10 @@ { "info": { - "_postman_id": "7ed6e99e-50de-4fe1-a17f-f582d6545160", + "_postman_id": "6f68cddc-016b-4d27-ac7e-c6ebc8dd4534", "name": "Terminal Registry Microservice Copy", "description": "Terminal Registry Microservice for Multi-channel Integration Layer of SW Client Project\n\nContact Support:\n Name: Antonio Tarricone\n Email: antonio.tarricone@pagopa.it", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "26204659" + "_exporter_id": "29646859" }, "item": [ { @@ -57,13 +57,11 @@ "header": [ { "key": "RequestId", - "value": "{{requestId}}", - "type": "text" + "value": "{{requestId}}" }, { "key": "Version", - "value": "{{mil_auth_api_version}}", - "type": "text" + "value": "{{mil_auth_api_version}}" } ], "body": { @@ -77,7 +75,7 @@ { "key": "client_id", "value": "{{tr_token_client_id}}", - "type": "text" + "type": "text" }, { "key": "client_secret", @@ -119,9 +117,9 @@ "method": "POST", "header": [ { - "description": "(Required) Request Id that will be logged by services", "key": "RequestId", - "value": "{{requestId}}" + "value": "{{requestId}}", + "description": "(Required) Request Id that will be logged by services" } ], "body": { @@ -153,6 +151,9 @@ "listen": "test", "script": { "exec": [ + "var jsonData = JSON.parse(pm.response.text());", + "pm.collectionVariables.set(\"terminalUuid\", jsonData.terminals[0].terminalUuid);", + "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});", @@ -167,9 +168,9 @@ "method": "GET", "header": [ { - "description": "(Required) Request Id that will be logged by services", "key": "RequestId", - "value": "{{requestId}}" + "value": "{{requestId}}", + "description": "(Required) Request Id that will be logged by services" } ], "url": { @@ -196,6 +197,95 @@ "description": "Returns a page of terminals" }, "response": [] + }, + { + "name": "Update Terminal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 204\", function () {", + " pm.response.to.have.status(204);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [ + { + "key": "RequestId", + "value": "{{requestId}}", + "description": "(Required) Request Id that will be logged by services" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"terminalHandlerId\": \"98765\",\r\n \"terminalId\": \"67899876\",\r\n \"enabled\": false,\r\n \"payeeCode\": \"MRNGLG93A01B103A\",\r\n \"slave\": false,\r\n \"workstations\": [\"cassa-1-ufficio-1\",\"cassa-2-ufficio-1\"],\r\n \"pagoPa\": true,\r\n \"pagoPaConf\": {\r\n \"pspId\": \"pspspId\",\r\n \"brokerId\": \"brockId\",\r\n \"channelId\": \"canalId\"\r\n },\r\n \"idpay\": false\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{MIL_TR_BASE_URL}}/terminals/{{terminalUuid}}", + "host": [ + "{{MIL_TR_BASE_URL}}" + ], + "path": [ + "terminals", + "{{terminalUuid}}" + ] + }, + "description": "Returns a page of terminals" + }, + "response": [] + }, + { + "name": "Delete Terminal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 204\", function () {", + " pm.response.to.have.status(204);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "RequestId", + "value": "{{requestId}}", + "description": "(Required) Request Id that will be logged by services" + } + ], + "url": { + "raw": "{{MIL_TR_BASE_URL}}/terminals/{{terminalUuid}}", + "host": [ + "{{MIL_TR_BASE_URL}}" + ], + "path": [ + "terminals", + "{{terminalUuid}}" + ] + }, + "description": "Returns a page of terminals" + }, + "response": [] } ], "auth": { @@ -294,6 +384,11 @@ { "key": "requestId", "value": "d0d654e6-97da-4848-b568-99fedccb642b" + }, + { + "key": "terminalUuid", + "value": "", + "type": "string" } ] } \ No newline at end of file