diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 5cdc80cc..757d7df0 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-api-config-selfcare-integration description: Microservice that manages requests from selfcare type: application -version: 1.58.0 -appVersion: 1.9.0 +version: 1.63.0 +appVersion: 1.9.0-5-VAS-427-nuova-api-get-channels dependencies: - name: microservice-chart version: 2.8.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index fbffa974..c317c4be 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -9,7 +9,7 @@ microservice-chart: maxSurge: 1 image: repository: ghcr.io/pagopa/pagopa-api-config-selfcare-integration - tag: "1.9.0" + tag: "1.9.0-5-VAS-427-nuova-api-get-channels" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 9d63199b..c3ec1df1 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -9,7 +9,7 @@ microservice-chart: maxSurge: 1 image: repository: ghcr.io/pagopa/pagopa-api-config-selfcare-integration - tag: "1.9.0" + tag: "1.9.0-5-VAS-427-nuova-api-get-channels" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 686222ee..d93c01c7 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -9,7 +9,7 @@ microservice-chart: maxSurge: 1 image: repository: ghcr.io/pagopa/pagopa-api-config-selfcare-integration - tag: "1.9.0" + tag: "1.9.0-5-VAS-427-nuova-api-get-channels" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 86d07df5..94fc1835 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1986 +1,1960 @@ { - "openapi": "3.0.1", - "info": { - "title": "API-Config - SelfCare Integration", - "description": "Spring application exposes APIs for SelfCare", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.9.0" + "openapi" : "3.0.1", + "info" : { + "title" : "API-Config - SelfCare Integration", + "description" : "Spring application exposes APIs for SelfCare", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "1.9.0-1-VAS-427-api-config-implementazione-nuova-api-get-channels" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "PSP Brokers", - "description": "Everything about PSP's brokers" - }, - { - "name": "Ibans", - "description": "Everything about IBANs" - }, - { - "name": "Creditor Institutions", - "description": "Everything about Creditor Institution" - }, - { - "name": "Brokers", - "description": "Everything about brokers" - } - ], - "paths": { - "/brokers/{brokerId}/creditor-institutions": { - "get": { - "tags": [ - "Brokers" - ], - "summary": "Get creditor institutions associated to broker by station", - "operationId": "getCreditorInstitutionsAssociatedToBroker", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "Number of elements on one page. Default = 50", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 50 - } - }, - { - "name": "page", - "in": "query", - "description": "Page number. Page value starts from 0", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32" - } - }, - { - "name": "brokerId", - "in": "path", - "description": "Filter by broker code associated to creditor institutions", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "enabled", - "in": "query", - "description": "Filter by enabled station", - "required": false, - "schema": { - "type": "boolean" - } + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "PSP Brokers", + "description" : "Everything about PSP's brokers" + }, { + "name" : "Ibans", + "description" : "Everything about IBANs" + }, { + "name" : "Creditor Institutions", + "description" : "Everything about Creditor Institution" + }, { + "name" : "PSP", + "description" : "Everything about PSP" + }, { + "name" : "Brokers", + "description" : "Everything about brokers" + } ], + "paths" : { + "/brokers/{brokerId}/creditor-institutions" : { + "get" : { + "tags" : [ "Brokers" ], + "summary" : "Get creditor institutions associated to broker by station", + "operationId" : "getCreditorInstitutionsAssociatedToBroker", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "Number of elements on one page. Default = 50", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 50 } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "page", + "in" : "query", + "description" : "Page number. Page value starts from 0", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "brokerId", + "in" : "path", + "description" : "Filter by broker code associated to creditor institutions", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "enabled", + "in" : "query", + "description" : "Filter by enabled station", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreditorInstitutionDetails" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreditorInstitutionDetails" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "400" : { + "description" : "Bad Request", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/brokers/{brokerId}/stations": { - "get": { - "tags": [ - "Brokers" - ], - "summary": "Get broker's station list", - "operationId": "getStationsDetailsFromBroker", - "parameters": [ - { - "name": "brokerId", - "in": "path", - "description": "The identifier of the broker.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "stationId", - "in": "query", - "description": "The identifier of the station.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 999, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } + "/brokers/{brokerId}/stations" : { + "get" : { + "tags" : [ "Brokers" ], + "summary" : "Get broker's station list", + "operationId" : "getStationsDetailsFromBroker", + "parameters" : [ { + "name" : "brokerId", + "in" : "path", + "description" : "The identifier of the broker.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "stationId", + "in" : "query", + "description" : "The identifier of the station.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StationDetailsList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StationDetailsList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/brokerspsp/{brokerId}/channels": { - "get": { - "tags": [ - "PSP Brokers" - ], - "summary": "Get PSP broker's channel list", - "operationId": "getChannelDetailsFromPSPBroker", - "parameters": [ - { - "name": "brokerId", - "in": "path", - "description": "The identifier of the PSP broker.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "channelId", - "in": "query", - "description": "The identifier of the channel.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 999, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } + "/brokerspsp/{brokerId}/channels" : { + "get" : { + "tags" : [ "PSP Brokers" ], + "summary" : "Get PSP broker's channel list", + "operationId" : "getChannelDetailsFromPSPBroker", + "parameters" : [ { + "name" : "brokerId", + "in" : "path", + "description" : "The identifier of the PSP broker.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "channelId", + "in" : "query", + "description" : "The identifier of the channel.", + "required" : false, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChannelDetailsList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ChannelDetailsList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/creditorinstitutions/{creditorInstitutionCode}/applicationcodes": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get application code associations with creditor institution", - "operationId": "getApplicationCodesFromCreditorInstitution", - "parameters": [ - { - "name": "creditorInstitutionCode", - "in": "path", - "description": "Organization fiscal code, the fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "showUsedCodes", - "in": "query", - "description": "The flag that permits to show the codes already used. Default: true", - "required": false, - "schema": { - "type": "boolean", - "default": true - } + "/creditorinstitutions/{creditorInstitutionCode}/applicationcodes" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get application code associations with creditor institution", + "operationId" : "getApplicationCodesFromCreditorInstitution", + "parameters" : [ { + "name" : "creditorInstitutionCode", + "in" : "path", + "description" : "Organization fiscal code, the fiscal code of the Organization.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "showUsedCodes", + "in" : "query", + "description" : "The flag that permits to show the codes already used. Default: true", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : true + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIAssociatedCodeList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CIAssociatedCodeList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/creditorinstitutions/{creditorInstitutionCode}/segregationcodes": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get segregation code associations with creditor institution", - "operationId": "getSegregationCodesFromCreditorInstitution", - "parameters": [ - { - "name": "creditorInstitutionCode", - "in": "path", - "description": "Organization fiscal code, the fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "showUsedCodes", - "in": "query", - "description": "The flag that permits to show the codes already used. Default: true", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "service", - "in": "query", - "description": "The service endpoint, to be used as a search filter to obtain only the segregation codes used by the CI for stations using same endpoint service. Default: null", - "required": false, - "schema": { - "type": "string" - } + "/creditorinstitutions/{creditorInstitutionCode}/segregationcodes" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get segregation code associations with creditor institution", + "operationId" : "getSegregationCodesFromCreditorInstitution", + "parameters" : [ { + "name" : "creditorInstitutionCode", + "in" : "path", + "description" : "Organization fiscal code, the fiscal code of the Organization.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "showUsedCodes", + "in" : "query", + "description" : "The flag that permits to show the codes already used. Default: true", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : true + } + }, { + "name" : "service", + "in" : "query", + "description" : "The service endpoint, to be used as a search filter to obtain only the segregation codes used by the CI for stations using same endpoint service. Default: null", + "required" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CIAssociatedCodeList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CIAssociatedCodeList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/creditorinstitutions/{creditorInstitutionCode}/stations": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get creditor institution station list", - "operationId": "getStationsDetailsFromCreditorInstitution", - "parameters": [ - { - "name": "creditorInstitutionCode", - "in": "path", - "description": "Organization fiscal code, the fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 999, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } + "/creditorinstitutions/{creditorInstitutionCode}/stations" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get creditor institution station list", + "operationId" : "getStationsDetailsFromCreditorInstitution", + "parameters" : [ { + "name" : "creditorInstitutionCode", + "in" : "path", + "description" : "Organization fiscal code, the fiscal code of the Organization.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StationDetailsList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StationDetailsList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/ibans": { - "post": { - "tags": [ - "Ibans" - ], - "summary": "Get the paginated list of all IBANs, filtering by creditor institution", - "operationId": "getIbans", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 1000, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } + "/ibans" : { + "post" : { + "tags" : [ "Ibans" ], + "summary" : "Get the paginated list of all IBANs, filtering by creditor institution", + "operationId" : "getIbans", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 1000, + "type" : "integer", + "format" : "int32", + "default" : 10 } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IbansList" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IbansList" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "Not Found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "400" : { + "description" : "Bad Request", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] + }, + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" + } + } ] + }, + "/payment-service-providers/{pspFiscalCode}/channels" : { + "get" : { + "tags" : [ "PSP" ], + "summary" : "Get PSP's channel list", + "operationId" : "getChannelByFiscalCode", + "parameters" : [ { + "name" : "pspFiscalCode", + "in" : "path", + "description" : "The fiscal code of the PSP.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ChannelDetailsList" + } + } + } + }, + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + } }, - { - "Authorization": [] + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + } + }, + "404" : { + "description" : "Not Found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + } + }, + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } } - ] + }, + "security" : [ { + "ApiKey" : [ ] + }, { + "Authorization" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] } }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } - } - }, - "IbanDetails": { - "type": "object", - "properties": { - "ci_fiscal_code": { - "type": "string" + "components" : { + "schemas" : { + "IbanDetails" : { + "type" : "object", + "properties" : { + "ci_fiscal_code" : { + "type" : "string" }, - "ci_name": { - "type": "string" + "ci_name" : { + "type" : "string" }, - "iban": { - "type": "string" + "iban" : { + "type" : "string" }, - "inserted_date": { - "type": "string", - "format": "date-time" + "inserted_date" : { + "type" : "string", + "format" : "date-time" }, - "validity_date": { - "type": "string", - "format": "date-time" + "validity_date" : { + "type" : "string", + "format" : "date-time" }, - "due_date": { - "type": "string", - "format": "date-time" + "due_date" : { + "type" : "string", + "format" : "date-time" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "owner_fiscal_code": { - "type": "string" + "owner_fiscal_code" : { + "type" : "string" }, - "labels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IbanLabel" + "labels" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/IbanLabel" } } }, - "description": "List of IBANs associated to the passed creditor institutions" + "description" : "List of IBANs associated to the passed creditor institutions" }, - "IbanLabel": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "IbanLabel" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" } } }, - "IbansList": { - "required": [ - "ibans", - "page_info" - ], - "type": "object", - "properties": { - "ibans": { - "type": "array", - "description": "List of IBANs associated to the passed creditor institutions", - "items": { - "$ref": "#/components/schemas/IbanDetails" - } - }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "IbansList" : { + "required" : [ "ibans", "page_info" ], + "type" : "object", + "properties" : { + "ibans" : { + "type" : "array", + "description" : "List of IBANs associated to the passed creditor institutions", + "items" : { + "$ref" : "#/components/schemas/IbanDetails" + } + }, + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "PageInfo": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "Page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "Required number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "Number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "Total number of pages", - "format": "int32" - }, - "total_items": { - "type": "integer", - "description": "Total number of items for all pages", - "format": "int64" + "PageInfo" : { + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "Page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "Required number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "Number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "Total number of pages", + "format" : "int32" + }, + "total_items" : { + "type" : "integer", + "description" : "Total number of items for all pages", + "format" : "int64" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - }, - "dbConnection": { - "type": "string" + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 + }, + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" } } }, - "BrokerDetails": { - "required": [ - "broker_code", - "broker_details", - "enabled", - "extended_fault_bean" - ], - "type": "object", - "properties": { - "broker_code": { - "maxLength": 35, - "minLength": 0, - "type": "string", - "description": "Code used to identify the intermediate EC", - "example": "223344556677889900" - }, - "broker_details": { - "type": "string", - "description": "Name and generic details of the intermediate EC", - "example": "Regione Veneto" - }, - "enabled": { - "type": "boolean", - "description": "Parameter to find out whether or not the intermediate has been enabled" - }, - "extended_fault_bean": { - "type": "boolean", - "description": "Parameter to find out whether or not the extended fault bean has been enabled" - } - }, - "description": "Details of the intermediate EC of the station" - }, - "StationDetails": { - "required": [ - "broker_details", - "enabled", - "port", - "primitive_version", - "protocol", - "station_code", - "thread_number", - "timeout_a", - "timeout_b", - "timeout_c", - "version" - ], - "type": "object", - "properties": { - "station_code": { - "maxLength": 35, - "minLength": 0, - "type": "string", - "description": "Unique code to identify the station", - "example": "1234567890100" - }, - "enabled": { - "type": "boolean", - "description": "Parameter to find out whether or not the station has been enabled", - "default": true - }, - "broker_description": { - "type": "string", - "description": "A description of the intermediate EC", - "example": "Regione Lazio" - }, - "version": { - "maximum": 2, - "minimum": 1, - "type": "integer", - "description": "The version of the station", - "format": "int64" - }, - "ip": { - "type": "string", - "description": "Ip address of the station" - }, - "new_password": { - "type": "string", - "description": "New password of the station" - }, - "password": { - "type": "string", - "description": "Password of the station" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "description": "Port address of the station", - "format": "int64" - }, - "protocol": { - "type": "string", - "description": "Protocol associated to the station", - "enum": [ - "HTTPS", - "HTTP" - ] - }, - "redirect_ip": { - "type": "string", - "description": "Redirect ip address of the station" - }, - "redirect_path": { - "type": "string", - "description": "Redirect path of the station" - }, - "redirect_port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "description": "Redirect port address of the station", - "format": "int64" - }, - "redirect_query_string": { - "type": "string", - "description": "Redirect query string of the station" - }, - "redirect_protocol": { - "type": "string", - "description": "Redirect protocol associated to the station", - "enum": [ - "HTTPS", - "HTTP" - ] - }, - "service": { - "type": "string" - }, - "pof_service": { - "type": "string" - }, - "broker_details": { - "$ref": "#/components/schemas/BrokerDetails" - }, - "protocol_4mod": { - "type": "string", - "description": "Protocol 4mod associated to the station", - "enum": [ - "HTTPS", - "HTTP" - ] - }, - "ip_4mod": { - "type": "string", - "description": "Ip address 4mod associated to the station" - }, - "port_4mod": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "description": "Port address 4mod associated to the station", - "format": "int64" - }, - "service_4mod": { - "type": "string" - }, - "proxy_enabled": { - "type": "boolean", - "description": "Parameter to inspect if the proxy has been enabled for this station" - }, - "proxy_host": { - "type": "string", - "description": "Proxy host" - }, - "proxy_port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "description": "Proxy port address", - "format": "int64" - }, - "proxy_username": { - "type": "string" - }, - "proxy_password": { - "type": "string" - }, - "thread_number": { - "minimum": 1, - "type": "integer", - "format": "int64" - }, - "timeout_a": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "timeout_b": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "timeout_c": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "flag_online": { - "type": "boolean" - }, - "invio_rt_istantaneo": { - "type": "boolean", - "description": "Parameter useful to find out if the instantaneous rt has been enabled" - }, - "target_host": { - "type": "string", - "description": "Target address of the station" - }, - "target_port": { - "type": "integer", - "description": "Port address target associated to the station", - "format": "int64" - }, - "target_path": { - "type": "string", - "description": "Target path of the station" - }, - "target_host_pof": { - "type": "string", - "description": "Pof address associated to the station" - }, - "target_port_pof": { - "type": "integer", - "description": "Port address pof associated to the station", - "format": "int64" - }, - "target_path_pof": { - "type": "string", - "description": "Pof path associated to the station" - }, - "primitive_version": { - "maximum": 2, - "minimum": 1, - "type": "integer", - "description": "Primitive number version", - "format": "int32", - "enum": [ - 1, - 2 - ] - } - }, - "description": "List of stations associated to the same entity" - }, - "StationDetailsList": { - "required": [ - "page_info", - "stations" - ], - "type": "object", - "properties": { - "stations": { - "type": "array", - "description": "List of stations associated to the same entity", - "items": { - "$ref": "#/components/schemas/StationDetails" - } + "ChannelDetails" : { + "required" : [ "agid", "broker_psp_code", "card_chart", "channel_code", "digital_stamp_brand", "enabled", "on_us", "payment_model", "port", "primitive_version", "protocol", "recovery", "rt_push", "thread_number", "timeout_a", "timeout_b", "timeout_c" ], + "type" : "object", + "properties" : { + "channel_code" : { + "type" : "string", + "example" : "223344556677889900" }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" - } - } - }, - "CIAssociatedCode": { - "required": [ - "code" - ], - "type": "object", - "properties": { - "code": { - "maxLength": 2, - "minLength": 2, - "type": "string", - "description": "The code that bound uniquely a creditor institution to a station" - }, - "name": { - "type": "string", - "description": "The name of the station associated to the creditor institution, if exists" - } - }, - "description": "List of codes not used for existing associations" - }, - "CIAssociatedCodeList": { - "required": [ - "unused" - ], - "type": "object", - "properties": { - "used": { - "type": "array", - "description": "List of codes already used for existing associations", - "items": { - "$ref": "#/components/schemas/CIAssociatedCode" - } + "enabled" : { + "type" : "boolean" }, - "unused": { - "type": "array", - "description": "List of codes not used for existing associations", - "items": { - "$ref": "#/components/schemas/CIAssociatedCode" - } - } - } - }, - "ChannelDetails": { - "required": [ - "agid", - "broker_psp_code", - "card_chart", - "channel_code", - "digital_stamp_brand", - "enabled", - "on_us", - "payment_model", - "port", - "primitive_version", - "protocol", - "recovery", - "rt_push", - "thread_number", - "timeout_a", - "timeout_b", - "timeout_c" - ], - "type": "object", - "properties": { - "channel_code": { - "type": "string", - "example": "223344556677889900" - }, - "enabled": { - "type": "boolean" - }, - "broker_description": { - "type": "string", - "description": "Broker description. Read only field", - "example": "Lorem ipsum dolor sit amet" - }, - "password": { - "type": "string" - }, - "new_password": { - "type": "string" - }, - "protocol": { - "type": "string", - "enum": [ - "HTTPS", - "HTTP" - ] - }, - "ip": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "format": "int64" - }, - "service": { - "type": "string" - }, - "broker_psp_code": { - "type": "string" - }, - "proxy_enabled": { - "type": "boolean" - }, - "proxy_host": { - "type": "string" - }, - "proxy_port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "format": "int64" - }, - "proxy_username": { - "type": "string" - }, - "proxy_password": { - "type": "string" - }, - "target_host": { - "type": "string" - }, - "target_port": { - "type": "integer", - "format": "int64" - }, - "target_path": { - "type": "string" - }, - "thread_number": { - "minimum": 1, - "type": "integer", - "format": "int64" - }, - "timeout_a": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "timeout_b": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "timeout_c": { - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "nmp_service": { - "type": "string" - }, - "new_fault_code": { - "type": "boolean" - }, - "target_host_nmp": { - "type": "string" - }, - "target_port_nmp": { - "type": "integer", - "format": "int64" + "broker_description" : { + "type" : "string", + "description" : "Broker description. Read only field", + "example" : "Lorem ipsum dolor sit amet" + }, + "password" : { + "type" : "string" + }, + "new_password" : { + "type" : "string" + }, + "protocol" : { + "type" : "string", + "enum" : [ "HTTPS", "HTTP" ] + }, + "ip" : { + "type" : "string" + }, + "port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" + }, + "service" : { + "type" : "string" + }, + "broker_psp_code" : { + "type" : "string" + }, + "proxy_enabled" : { + "type" : "boolean" + }, + "proxy_host" : { + "type" : "string" + }, + "proxy_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" + }, + "proxy_username" : { + "type" : "string" + }, + "proxy_password" : { + "type" : "string" + }, + "target_host" : { + "type" : "string" + }, + "target_port" : { + "type" : "integer", + "format" : "int64" + }, + "target_path" : { + "type" : "string" + }, + "thread_number" : { + "minimum" : 1, + "type" : "integer", + "format" : "int64" + }, + "timeout_a" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "timeout_b" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "timeout_c" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "nmp_service" : { + "type" : "string" + }, + "new_fault_code" : { + "type" : "boolean" + }, + "target_host_nmp" : { + "type" : "string" }, - "target_path_nmp": { - "type": "string" + "target_port_nmp" : { + "type" : "integer", + "format" : "int64" }, - "redirect_ip": { - "type": "string" + "target_path_nmp" : { + "type" : "string" }, - "redirect_path": { - "type": "string" + "redirect_ip" : { + "type" : "string" }, - "redirect_port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "format": "int64" + "redirect_path" : { + "type" : "string" }, - "redirect_query_string": { - "type": "string" + "redirect_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" }, - "redirect_protocol": { - "type": "string", - "enum": [ - "HTTPS", - "HTTP" - ] + "redirect_query_string" : { + "type" : "string" }, - "payment_model": { - "type": "string", - "enum": [ - "IMMEDIATE", - "IMMEDIATE_MULTIBENEFICIARY", - "DEFERRED", - "ACTIVATED_AT_PSP" - ] + "redirect_protocol" : { + "type" : "string", + "enum" : [ "HTTPS", "HTTP" ] }, - "serv_plugin": { - "type": "string" + "payment_model" : { + "type" : "string", + "enum" : [ "IMMEDIATE", "IMMEDIATE_MULTIBENEFICIARY", "DEFERRED", "ACTIVATED_AT_PSP" ] }, - "rt_push": { - "type": "boolean" + "serv_plugin" : { + "type" : "string" }, - "on_us": { - "type": "boolean" + "rt_push" : { + "type" : "boolean" }, - "card_chart": { - "type": "boolean" + "on_us" : { + "type" : "boolean" }, - "recovery": { - "type": "boolean" + "card_chart" : { + "type" : "boolean" }, - "digital_stamp_brand": { - "type": "boolean" + "recovery" : { + "type" : "boolean" }, - "flag_io": { - "type": "boolean" + "digital_stamp_brand" : { + "type" : "boolean" }, - "flag_psp_cp": { - "type": "boolean" + "flag_io" : { + "type" : "boolean" }, - "agid": { - "type": "boolean" + "flag_psp_cp" : { + "type" : "boolean" }, - "primitive_version": { - "maximum": 2, - "minimum": 1, - "type": "integer", - "description": "Primitive number version", - "format": "int32" + "agid" : { + "type" : "boolean" + }, + "primitive_version" : { + "maximum" : 2, + "minimum" : 1, + "type" : "integer", + "description" : "Primitive number version", + "format" : "int32" } }, - "description": "List of stations associated to the same entity" + "description" : "List of stations associated to the same entity" }, - "ChannelDetailsList": { - "required": [ - "channels", - "page_info" - ], - "type": "object", - "properties": { - "channels": { - "type": "array", - "description": "List of stations associated to the same entity", - "items": { - "$ref": "#/components/schemas/ChannelDetails" - } + "ChannelDetailsList" : { + "required" : [ "channels", "page_info" ], + "type" : "object", + "properties" : { + "channels" : { + "type" : "array", + "description" : "List of stations associated to the same entity", + "items" : { + "$ref" : "#/components/schemas/ChannelDetails" + } + }, + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" + } + } + }, + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "environment" : { + "type" : "string" + }, + "dbConnection" : { + "type" : "string" } } }, - "CreditorInstitutionDetail": { - "required": [ - "broker_code", - "business_name", - "creditor_institution_code", - "station_code", - "station_enabled", - "station_version" - ], - "type": "object", - "properties": { - "business_name": { - "type": "string", - "description": "The business name of the creditor institution", - "example": "Comune di Roma" - }, - "creditor_institution_code": { - "type": "string", - "description": "The fiscal code of the creditor institution", - "example": "02438750586" - }, - "cbill_code": { - "type": "string", - "description": "The CBill code of the creditor institution", - "example": "APNEY" - }, - "broker_business_name": { - "type": "string", - "description": "The business name of the broker associated to creditor institution by defined station", - "example": "Regione Lazio" - }, - "broker_code": { - "type": "string", - "description": "The fiscal code of the broker associated to creditor institution by defined station", - "example": "80143490581" - }, - "station_code": { - "type": "string", - "description": "The code of the station that permits to associate a creditor institution to a broker", - "example": "80143490581_01" - }, - "station_enabled": { - "type": "boolean", - "description": "The flag that define if the station is enabled or not", - "default": true - }, - "station_version": { - "type": "integer", - "description": "The version of the station. It can be either 1 or 2", - "format": "int64", - "example": 2 - }, - "aux_digit": { - "type": "integer", - "description": "The value of the AUX digit field that can be set in payments' IUV", - "format": "int64", - "example": 3 - }, - "segregation_code": { - "type": "string", - "description": "The value of the segregation code that can be set in payments' IUV in order to use this station", - "example": "05" - }, - "application_code": { - "type": "string", - "description": "The value of the application code that can be set in payments' IUV in order to use this station", - "example": "02" - }, - "broadcast": { - "type": "boolean", - "description": "The flag that define if the station is made for broadcast operations" + "BrokerDetails" : { + "required" : [ "broker_code", "broker_details", "enabled", "extended_fault_bean" ], + "type" : "object", + "properties" : { + "broker_code" : { + "maxLength" : 35, + "minLength" : 0, + "type" : "string", + "description" : "Code used to identify the intermediate EC", + "example" : "223344556677889900" + }, + "broker_details" : { + "type" : "string", + "description" : "Name and generic details of the intermediate EC", + "example" : "Regione Veneto" + }, + "enabled" : { + "type" : "boolean", + "description" : "Parameter to find out whether or not the intermediate has been enabled" + }, + "extended_fault_bean" : { + "type" : "boolean", + "description" : "Parameter to find out whether or not the extended fault bean has been enabled" + } + }, + "description" : "Details of the intermediate EC of the station" + }, + "StationDetails" : { + "required" : [ "broker_details", "enabled", "port", "primitive_version", "protocol", "station_code", "thread_number", "timeout_a", "timeout_b", "timeout_c", "version" ], + "type" : "object", + "properties" : { + "station_code" : { + "maxLength" : 35, + "minLength" : 0, + "type" : "string", + "description" : "Unique code to identify the station", + "example" : "1234567890100" + }, + "enabled" : { + "type" : "boolean", + "description" : "Parameter to find out whether or not the station has been enabled", + "default" : true + }, + "broker_description" : { + "type" : "string", + "description" : "A description of the intermediate EC", + "example" : "Regione Lazio" + }, + "version" : { + "maximum" : 2, + "minimum" : 1, + "type" : "integer", + "description" : "The version of the station", + "format" : "int64" + }, + "ip" : { + "type" : "string", + "description" : "Ip address of the station" + }, + "new_password" : { + "type" : "string", + "description" : "New password of the station" + }, + "password" : { + "type" : "string", + "description" : "Password of the station" + }, + "port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "description" : "Port address of the station", + "format" : "int64" + }, + "protocol" : { + "type" : "string", + "description" : "Protocol associated to the station", + "enum" : [ "HTTPS", "HTTP" ] + }, + "redirect_ip" : { + "type" : "string", + "description" : "Redirect ip address of the station" + }, + "redirect_path" : { + "type" : "string", + "description" : "Redirect path of the station" + }, + "redirect_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "description" : "Redirect port address of the station", + "format" : "int64" + }, + "redirect_query_string" : { + "type" : "string", + "description" : "Redirect query string of the station" + }, + "redirect_protocol" : { + "type" : "string", + "description" : "Redirect protocol associated to the station", + "enum" : [ "HTTPS", "HTTP" ] + }, + "service" : { + "type" : "string" + }, + "pof_service" : { + "type" : "string" + }, + "broker_details" : { + "$ref" : "#/components/schemas/BrokerDetails" + }, + "protocol_4mod" : { + "type" : "string", + "description" : "Protocol 4mod associated to the station", + "enum" : [ "HTTPS", "HTTP" ] + }, + "ip_4mod" : { + "type" : "string", + "description" : "Ip address 4mod associated to the station" + }, + "port_4mod" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "description" : "Port address 4mod associated to the station", + "format" : "int64" + }, + "service_4mod" : { + "type" : "string" + }, + "proxy_enabled" : { + "type" : "boolean", + "description" : "Parameter to inspect if the proxy has been enabled for this station" + }, + "proxy_host" : { + "type" : "string", + "description" : "Proxy host" + }, + "proxy_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "description" : "Proxy port address", + "format" : "int64" + }, + "proxy_username" : { + "type" : "string" + }, + "proxy_password" : { + "type" : "string" + }, + "thread_number" : { + "minimum" : 1, + "type" : "integer", + "format" : "int64" + }, + "timeout_a" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "timeout_b" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "timeout_c" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" + }, + "flag_online" : { + "type" : "boolean" + }, + "invio_rt_istantaneo" : { + "type" : "boolean", + "description" : "Parameter useful to find out if the instantaneous rt has been enabled" + }, + "target_host" : { + "type" : "string", + "description" : "Target address of the station" + }, + "target_port" : { + "type" : "integer", + "description" : "Port address target associated to the station", + "format" : "int64" + }, + "target_path" : { + "type" : "string", + "description" : "Target path of the station" + }, + "target_host_pof" : { + "type" : "string", + "description" : "Pof address associated to the station" + }, + "target_port_pof" : { + "type" : "integer", + "description" : "Port address pof associated to the station", + "format" : "int64" + }, + "target_path_pof" : { + "type" : "string", + "description" : "Pof path associated to the station" + }, + "primitive_version" : { + "maximum" : 2, + "minimum" : 1, + "type" : "integer", + "description" : "Primitive number version", + "format" : "int32", + "enum" : [ 1, 2 ] } }, - "description": "List of creditor institutions associated to the same broker by different stations" + "description" : "List of stations associated to the same entity" }, - "CreditorInstitutionDetails": { - "required": [ - "creditor_institutions", - "page_info" - ], - "type": "object", - "properties": { - "creditor_institutions": { - "type": "array", - "description": "List of creditor institutions associated to the same broker by different stations", - "items": { - "$ref": "#/components/schemas/CreditorInstitutionDetail" + "StationDetailsList" : { + "required" : [ "page_info", "stations" ], + "type" : "object", + "properties" : { + "stations" : { + "type" : "array", + "description" : "List of stations associated to the same entity", + "items" : { + "$ref" : "#/components/schemas/StationDetails" + } + }, + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" + } + } + }, + "CIAssociatedCode" : { + "required" : [ "code" ], + "type" : "object", + "properties" : { + "code" : { + "maxLength" : 2, + "minLength" : 2, + "type" : "string", + "description" : "The code that bound uniquely a creditor institution to a station" + }, + "name" : { + "type" : "string", + "description" : "The name of the station associated to the creditor institution, if exists" + } + }, + "description" : "List of codes not used for existing associations" + }, + "CIAssociatedCodeList" : { + "required" : [ "unused" ], + "type" : "object", + "properties" : { + "used" : { + "type" : "array", + "description" : "List of codes already used for existing associations", + "items" : { + "$ref" : "#/components/schemas/CIAssociatedCode" + } + }, + "unused" : { + "type" : "array", + "description" : "List of codes not used for existing associations", + "items" : { + "$ref" : "#/components/schemas/CIAssociatedCode" } - }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + } + } + }, + "CreditorInstitutionDetail" : { + "required" : [ "broker_code", "business_name", "creditor_institution_code", "psp_payment", "station_code", "station_enabled", "station_version" ], + "type" : "object", + "properties" : { + "business_name" : { + "type" : "string", + "description" : "The business name of the creditor institution", + "example" : "Comune di Roma" + }, + "creditor_institution_code" : { + "type" : "string", + "description" : "The fiscal code of the creditor institution", + "example" : "02438750586" + }, + "psp_payment" : { + "type" : "boolean", + "default" : true + }, + "cbill_code" : { + "type" : "string", + "description" : "The CBill code of the creditor institution", + "example" : "APNEY" + }, + "broker_business_name" : { + "type" : "string", + "description" : "The business name of the broker associated to creditor institution by defined station", + "example" : "Regione Lazio" + }, + "broker_code" : { + "type" : "string", + "description" : "The fiscal code of the broker associated to creditor institution by defined station", + "example" : "80143490581" + }, + "station_code" : { + "type" : "string", + "description" : "The code of the station that permits to associate a creditor institution to a broker", + "example" : "80143490581_01" + }, + "station_enabled" : { + "type" : "boolean", + "description" : "The flag that define if the station is enabled or not", + "default" : true + }, + "station_version" : { + "type" : "integer", + "description" : "The version of the station. It can be either 1 or 2", + "format" : "int64", + "example" : 2 + }, + "aux_digit" : { + "type" : "integer", + "description" : "The value of the AUX digit field that can be set in payments' IUV", + "format" : "int64", + "example" : 3 + }, + "segregation_code" : { + "type" : "string", + "description" : "The value of the segregation code that can be set in payments' IUV in order to use this station", + "example" : "05" + }, + "application_code" : { + "type" : "string", + "description" : "The value of the application code that can be set in payments' IUV in order to use this station", + "example" : "02" + }, + "broadcast" : { + "type" : "boolean", + "description" : "The flag that define if the station is made for broadcast operations" + } + }, + "description" : "List of creditor institutions associated to the same broker by different stations" + }, + "CreditorInstitutionDetails" : { + "required" : [ "creditor_institutions", "page_info" ], + "type" : "object", + "properties" : { + "creditor_institutions" : { + "type" : "array", + "description" : "List of creditor institutions associated to the same broker by different stations", + "items" : { + "$ref" : "#/components/schemas/CreditorInstitutionDetail" + } + }, + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" }, - "Authorization": { - "type": "http", - "description": "JWT token get after Azure Login", - "scheme": "bearer", - "bearerFormat": "JWT" + "Authorization" : { + "type" : "http", + "description" : "JWT token get after Azure Login", + "scheme" : "bearer", + "bearerFormat" : "JWT" } } } -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 539e3c14..60d52367 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa.api-config selfcareintegration - 1.9.0 + 1.9.0-1-VAS-427-nuova-api-get-channels API-Config - SelfCare Integration Spring application exposes APIs for SelfCare @@ -177,17 +177,9 @@ - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.7.0.1746 - - - verify - - sonar - - - + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/PspController.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/PspController.java new file mode 100644 index 00000000..5f8318c7 --- /dev/null +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/PspController.java @@ -0,0 +1,66 @@ +package it.gov.pagopa.apiconfig.selfcareintegration.controller; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import it.gov.pagopa.apiconfig.selfcareintegration.model.ProblemJson; +import it.gov.pagopa.apiconfig.selfcareintegration.model.channel.ChannelDetailsList; +import it.gov.pagopa.apiconfig.selfcareintegration.service.PspService; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.Positive; + +@RestController() +@RequestMapping(path = "/payment-service-providers") +@Tag(name = "PSP", description = "Everything about PSP") +@Validated +public class PspController { + + private final PspService pspService; + + public PspController(PspService pspService) { + this.pspService = pspService; + } + + + @Operation(summary = "Get PSP's channel list", + security = {@SecurityRequirement(name = "ApiKey"), @SecurityRequirement(name = "Authorization")}, + tags = {"PSP",}) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ChannelDetailsList.class))), + @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse(responseCode = "429", description = "Too many requests", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "500", description = "Service unavailable", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ProblemJson.class)))}) + @GetMapping(value = "/{pspFiscalCode}/channels", + produces = {MediaType.APPLICATION_JSON_VALUE}) + public ResponseEntity getChannelByFiscalCode( + @Parameter(description = "The fiscal code of the PSP.", required = true) + @PathVariable("pspFiscalCode") + String pspFiscalCode, + @Valid + @Parameter(description = "The number of elements to be included in the page.", required = true) + @RequestParam(required = false, defaultValue = "10") + @Positive @Max(999) + Integer limit, + @Valid + @Parameter(description = "The index of the page, starting from 0.", required = true) + @Min(0) + @RequestParam(required = false, defaultValue = "0") + Integer page) { + return ResponseEntity.ok(pspService.getChannelByFiscalCode(pspFiscalCode, PageRequest.of(page, limit))); + } +} diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/repository/ExtendedChannelRepository.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/repository/ExtendedChannelRepository.java index ef95d1ed..6fb670a6 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/repository/ExtendedChannelRepository.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/repository/ExtendedChannelRepository.java @@ -13,8 +13,7 @@ @Repository public interface ExtendedChannelRepository extends CanaliRepository { - Page findByFkIntermediarioPsp_objIdOrderByIdCanale( - @Param("fkIntermediario") Long brokerId, Pageable pageable); + Page findByFkIntermediarioPsp_objIdOrderByIdCanale(@Param("fkIntermediario") Long brokerId, Pageable pageable); @Query( value = @@ -25,4 +24,12 @@ Page findAllByFiltersOrderById( @Param("fkIntermediario") Long brokerId, @Param("idCanale") String channelId, Pageable pageable); + + @Query(value = "SELECT DISTINCT c FROM Psp p, PspCanaleTipoVersamento pct, CanaleTipoVersamento ct, Canali c " + + "WHERE p.objId = pct.fkPsp " + + "AND pct.fkCanaleTipoVersamento = ct.id " + + "AND ct.fkCanale = c.id " + + "AND p.codiceFiscale = :fiscalCode") + Page findAllByPspFiscalCode(@Param("fiscalCode") String fiscalCode, Pageable pageable); + } diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/BrokerPSPsService.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/BrokerPSPsService.java index bf4c0b52..09f630ee 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/BrokerPSPsService.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/BrokerPSPsService.java @@ -45,7 +45,7 @@ public ChannelDetailsList getChannelDetailsFromPSPBroker( List channels = queryResult .stream() - .map(station -> modelMapper.map(station, ChannelDetails.class)) + .map(elem -> modelMapper.map(elem, ChannelDetails.class)) .collect(Collectors.toList()); return ChannelDetailsList.builder() .pageInfo(Utility.buildPageInfo(queryResult)) diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/PspService.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/PspService.java new file mode 100644 index 00000000..775dc954 --- /dev/null +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/service/PspService.java @@ -0,0 +1,44 @@ +package it.gov.pagopa.apiconfig.selfcareintegration.service; + +import it.gov.pagopa.apiconfig.selfcareintegration.model.channel.ChannelDetails; +import it.gov.pagopa.apiconfig.selfcareintegration.model.channel.ChannelDetailsList; +import it.gov.pagopa.apiconfig.selfcareintegration.repository.ExtendedChannelRepository; +import it.gov.pagopa.apiconfig.selfcareintegration.util.Utility; +import org.modelmapper.ModelMapper; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import javax.transaction.Transactional; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class PspService { + + private final ExtendedChannelRepository extendedChannelRepository; + + private final ModelMapper modelMapper; + + public PspService(ExtendedChannelRepository extendedChannelRepository, ModelMapper modelMapper) { + this.extendedChannelRepository = extendedChannelRepository; + this.modelMapper = modelMapper; + } + + @Transactional + public ChannelDetailsList getChannelByFiscalCode(String pspFiscalCode, Pageable pageable) { + var queryResult = extendedChannelRepository.findAllByPspFiscalCode(pspFiscalCode, pageable); + + List channelsDetailsList = queryResult.stream() + .map(elem -> modelMapper.map(elem, ChannelDetails.class)) + .collect(Collectors.toList()); + + return ChannelDetailsList.builder() + .channelsDetailsList(channelsDetailsList) + .pageInfo(Utility.buildPageInfo(queryResult)) + .build(); + } + + +} + + diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 5e42c60c..f064f6bb 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -10,6 +10,8 @@ cors.configuration={"origins": ["*"], "methods": ["*"]} #spring.datasource.username=NODO4_CFG #spring.datasource.password=NODO4_CFG #spring.datasource.driver-class-name=oracle.jdbc.OracleDriver +#spring.jpa.properties.hibernate.default_schema=NODO4_CFG +#spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect spring.datasource.url=jdbc:postgresql://pagopa-d-weu-nodo-flexible-postgresql.postgres.database.azure.com:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg spring.datasource.username=cfg spring.datasource.password=${PASSWORD} diff --git a/src/test/java/it/gov/pagopa/apiconfig/OpenApiGenerationTest.java b/src/test/java/it/gov/pagopa/apiconfig/OpenApiGenerationTest.java index 8a5176ff..819b94c6 100644 --- a/src/test/java/it/gov/pagopa/apiconfig/OpenApiGenerationTest.java +++ b/src/test/java/it/gov/pagopa/apiconfig/OpenApiGenerationTest.java @@ -1,12 +1,6 @@ package it.gov.pagopa.apiconfig; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -16,32 +10,41 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; -@SpringBootTest(classes = Application.class) +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +@SpringBootTest @AutoConfigureMockMvc class OpenApiGenerationTest { - @Autowired ObjectMapper objectMapper; + @Autowired + ObjectMapper objectMapper; - @Autowired private MockMvc mvc; + @Autowired + private MockMvc mvc; - @Test - void swaggerSpringPlugin() throws Exception { - mvc.perform(MockMvcRequestBuilders.get("/v3/api-docs").accept(MediaType.APPLICATION_JSON)) - .andExpect(MockMvcResultMatchers.status().is2xxSuccessful()) - .andDo( - (result) -> { - assertNotNull(result); - assertNotNull(result.getResponse()); - final String content = result.getResponse().getContentAsString(); - assertFalse(content.isBlank()); - assertFalse(content.contains("${"), "Generated swagger contains placeholders"); - Object swagger = - objectMapper.readValue(result.getResponse().getContentAsString(), Object.class); - String formatted = - objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger); - Path basePath = Paths.get("openapi/"); - Files.createDirectories(basePath); - Files.write(basePath.resolve("openapi.json"), formatted.getBytes()); - }); - } + @Test + void swaggerSpringPlugin() throws Exception { + mvc.perform(MockMvcRequestBuilders.get("/v3/api-docs").accept(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().is2xxSuccessful()) + .andDo( + (result) -> { + assertNotNull(result); + assertNotNull(result.getResponse()); + final String content = result.getResponse().getContentAsString(); + assertFalse(content.isBlank()); + assertFalse(content.contains("${"), "Generated swagger contains placeholders"); + Object swagger = + objectMapper.readValue(result.getResponse().getContentAsString(), Object.class); + String formatted = + objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger); + Path basePath = Paths.get("openapi/"); + Files.createDirectories(basePath); + Files.write(basePath.resolve("openapi.json"), formatted.getBytes()); + }); + } } diff --git a/src/test/java/it/gov/pagopa/apiconfig/controller/PspControllerTest.java b/src/test/java/it/gov/pagopa/apiconfig/controller/PspControllerTest.java new file mode 100644 index 00000000..b5edbb1c --- /dev/null +++ b/src/test/java/it/gov/pagopa/apiconfig/controller/PspControllerTest.java @@ -0,0 +1,51 @@ +package it.gov.pagopa.apiconfig.controller; + +import it.gov.pagopa.apiconfig.Application; +import it.gov.pagopa.apiconfig.selfcareintegration.service.PspService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.MediaType; +import org.springframework.test.web.servlet.MockMvc; + +import java.io.IOException; + +import static it.gov.pagopa.apiconfig.util.TestUtil.getMockChannelDetailsList; +import static org.mockito.Mockito.when; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@SpringBootTest(classes = Application.class) +@AutoConfigureMockMvc +class PspControllerTest { + + @Autowired + private MockMvc mvc; + + @MockBean + private PspService pspService; + + @BeforeEach + void setup() throws IOException { + when(pspService.getChannelByFiscalCode( + "CF70000000001", PageRequest.of(0, 10))) + .thenReturn(getMockChannelDetailsList()); + } + + @ParameterizedTest + @CsvSource({ + "/payment-service-providers/CF70000000001/channels?limit=10&page=0", + }) + void getChannelByFiscalCode(String url) throws Exception { + mvc.perform(get(url).contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)); + } + +} diff --git a/src/test/java/it/gov/pagopa/apiconfig/service/PspServiceTest.java b/src/test/java/it/gov/pagopa/apiconfig/service/PspServiceTest.java new file mode 100644 index 00000000..dcce40cf --- /dev/null +++ b/src/test/java/it/gov/pagopa/apiconfig/service/PspServiceTest.java @@ -0,0 +1,71 @@ +package it.gov.pagopa.apiconfig.service; + +import it.gov.pagopa.apiconfig.Application; +import it.gov.pagopa.apiconfig.selfcareintegration.exception.AppException; +import it.gov.pagopa.apiconfig.selfcareintegration.model.channel.ChannelDetailsList; +import it.gov.pagopa.apiconfig.selfcareintegration.repository.ExtendedChannelRepository; +import it.gov.pagopa.apiconfig.selfcareintegration.service.BrokerPSPsService; +import it.gov.pagopa.apiconfig.selfcareintegration.service.PspService; +import it.gov.pagopa.apiconfig.starter.entity.Canali; +import it.gov.pagopa.apiconfig.starter.entity.IntermediariPsp; +import it.gov.pagopa.apiconfig.starter.repository.IntermediariPspRepository; +import it.gov.pagopa.apiconfig.util.TestUtil; +import org.assertj.core.util.Lists; +import org.json.JSONException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.skyscreamer.jsonassert.JSONAssert; +import org.skyscreamer.jsonassert.JSONCompareMode; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpStatus; + +import java.io.IOException; +import java.util.Optional; +import java.util.TimeZone; + +import static it.gov.pagopa.apiconfig.util.TestUtil.getMockChannel; +import static it.gov.pagopa.apiconfig.util.TestUtil.getMockPSPBroker; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.when; + +@SpringBootTest(classes = Application.class) +class PspServiceTest { + + @MockBean private ExtendedChannelRepository channelRepository; + + @MockBean private IntermediariPspRepository brokerPspRepository; + + @Mock private Pageable pageable; + + @Autowired + @InjectMocks + private PspService pspService; + + @BeforeEach + void setup() { + TimeZone.setDefault(TimeZone.getTimeZone("UTC")); + } + + @Test + void getChannelByFiscalCode_200() throws IOException, JSONException { + Page page = TestUtil.mockPage(Lists.newArrayList(getMockChannel()), 10, 0); + + when(channelRepository.findAllByPspFiscalCode(anyString(), any(Pageable.class))) + .thenReturn(page); + + var result = pspService.getChannelByFiscalCode("CF70000000001", pageable); + String actual = TestUtil.toJson(result); + String expected = TestUtil.readJsonFromFile("response/get_broker_channels_details_ok1.json"); + JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT); + } + +} diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 2f4758cb..4de78e1c 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -7,7 +7,7 @@ info.properties.environment=test # Server server.servlet.context-path=/ -server.port=8181 +server.port=8080 # logging logging.level.root=INFO