diff --git a/openapi/openapi.json b/openapi/openapi.json index d9742be4..5f7fae36 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,2751 +1,2526 @@ { - "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.12.1" + "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.12.0" }, - "servers": [ - { - "url": "http://localhost:8080" - }, - { - "url": "https://{host}{basePath}", - "variables": { - "host": { - "default": "api.dev.platform.pagopa.it", - "enum": [ - "api.dev.platform.pagopa.it", - "api.uat.platform.pagopa.it", - "api.platform.pagopa.it" - ] - }, - "basePath": { - "default": "/apiconfig-selfcare-integration/v1/" - } + "servers" : [ { + "url" : "http://localhost:8080" + }, { + "url" : "https://{host}{basePath}", + "variables" : { + "host" : { + "default" : "api.dev.platform.pagopa.it", + "enum" : [ "api.dev.platform.pagopa.it", "api.uat.platform.pagopa.it", "api.platform.pagopa.it" ] + }, + "basePath" : { + "default" : "/apiconfig-selfcare-integration/v1/" } } - ], - "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/{broker-tax-code}/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": "broker-tax-code", - "in": "path", - "description": "Filter by broker tax 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" + } ], + "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/{broker-tax-code}/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" : "broker-tax-code", + "in" : "path", + "description" : "Filter by broker tax 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/{broker-tax-code}/stations": { - "get": { - "tags": [ - "Brokers" - ], - "summary": "Get broker's station list", - "operationId": "getStationsDetailsFromBroker", - "parameters": [ - { - "name": "broker-tax-code", - "in": "path", - "description": "The broker's tax code.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "stationId", - "in": "query", - "description": "The identifier of the station.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ciTaxCode", - "in": "query", - "description": "The creditor institution's tax code.", - "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 - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/brokers/{broker-tax-code}/stations" : { + "get" : { + "tags" : [ "Brokers" ], + "summary" : "Get broker's station list", + "operationId" : "getStationsDetailsFromBroker", + "parameters" : [ { + "name" : "broker-tax-code", + "in" : "path", + "description" : "The broker's tax code.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "stationId", + "in" : "query", + "description" : "The identifier of the station.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "ciTaxCode", + "in" : "query", + "description" : "The creditor institution's tax code.", + "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 + } + } ], + "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 - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "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 + } + } ], + "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": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get the list of creditor institution business names", - "description": "Return a list of business name and tax code of creditor institutions, given the provided list of creditor institution tax codes", - "operationId": "getCreditorInstitutionNamesFromTaxCodes", - "parameters": [ - { - "name": "taxCodeList", - "in": "query", - "description": "List of Creditor Institution's tax code", - "required": true, - "schema": { - "maxItems": 10, - "minItems": 0, - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/creditorinstitutions" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get the list of creditor institution business names", + "description" : "Return a list of business name and tax code of creditor institutions, given the provided list of creditor institution tax codes", + "operationId" : "getCreditorInstitutionNamesFromTaxCodes", + "parameters" : [ { + "name" : "taxCodeList", + "in" : "query", + "description" : "List of Creditor Institution's tax code", + "required" : true, + "schema" : { + "maxItems" : 10, + "minItems" : 0, + "type" : "array", + "items" : { + "type" : "string" + } + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CreditorInstitutionInfo" + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CreditorInstitutionInfo" } } } } }, - "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" } } } }, - "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/stations/{station-code}": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get the list of creditor institutions that can be associated to a station", - "operationId": "getStationCreditorInstitutions", - "parameters": [ - { - "name": "station-code", - "in": "path", - "description": "Station's code", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ciTaxCodeList", - "in": "query", - "description": "List of Creditor Institution's tax code, restrict the research to this tax code list only", - "required": true, - "schema": { - "maxItems": 10, - "minItems": 0, - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/creditorinstitutions/stations/{station-code}" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get the list of creditor institutions that can be associated to a station", + "operationId" : "getStationCreditorInstitutions", + "parameters" : [ { + "name" : "station-code", + "in" : "path", + "description" : "Station's code", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ciTaxCodeList", + "in" : "query", + "description" : "List of Creditor Institution's tax code, restrict the research to this tax code list only", + "required" : true, + "schema" : { + "maxItems" : 10, + "minItems" : 0, + "type" : "array", + "items" : { + "type" : "string" + } + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CreditorInstitutionInfo" + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CreditorInstitutionInfo" } } } } }, - "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" } } } }, - "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/{ci-tax-code}/segregationcodes": { - "get": { - "tags": [ - "Creditor Institutions" - ], - "summary": "Get segregation code associations with creditor institution", - "operationId": "getSegregationCodesFromCreditorInstitution", - "parameters": [ - { - "name": "ci-tax-code", - "in": "path", - "description": "Creditor institution's tax code that own the station", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "targetCITaxCode", - "in": "query", - "description": "Tax code of the creditor institution that will be associated to the station", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/creditorinstitutions/{ci-tax-code}/segregationcodes" : { + "get" : { + "tags" : [ "Creditor Institutions" ], + "summary" : "Get segregation code associations with creditor institution", + "operationId" : "getSegregationCodesFromCreditorInstitution", + "parameters" : [ { + "name" : "ci-tax-code", + "in" : "path", + "description" : "Creditor institution's tax code that own the station", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "targetCITaxCode", + "in" : "query", + "description" : "Tax code of the creditor institution that will be associated to the station", + "required" : true, + "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/AvailableCodes" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AvailableCodes" } } } }, - "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 - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "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 + } + } ], + "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 - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "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 + } + } ], + "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 - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": true + "/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 + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, + "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" } - ] + } ] }, - "/ibans/{creditorinstitutioncode}/list": { - "get": { - "tags": [ - "Creditor Institutions", - "Ibans" - ], - "summary": "Get creditor institution ibans list", - "operationId": "getIbans_1", - "parameters": [ - { - "name": "creditorinstitutioncode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "maxLength": 50, - "minLength": 0, - "pattern": "\\d{11}", - "type": "string" - } - }, - { - "name": "label", - "in": "query", - "description": "Filter by label", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/ibans/{creditorinstitutioncode}/list" : { + "get" : { + "tags" : [ "Creditor Institutions", "Ibans" ], + "summary" : "Get creditor institution ibans list", + "operationId" : "getIbans_1", + "parameters" : [ { + "name" : "creditorinstitutioncode", + "in" : "path", + "description" : "The fiscal code of the Organization.", + "required" : true, + "schema" : { + "maxLength" : 50, + "minLength" : 0, + "pattern" : "\\d{11}", + "type" : "string" + } + }, { + "name" : "label", + "in" : "query", + "description" : "Filter by label", + "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/IbansEnhanced" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IbansEnhanced" } } } }, - "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" } } } }, - "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": [] - }, - { - "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" } - ] + } ] }, - "/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" + "/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" + "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" } - ] + } ] } }, - "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" + "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" + "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" } }, - "description": "The labels array associated with the iban" + "description" : "The labels array associated with the iban" }, - "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" } } }, - "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" + "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" }, - "target_path_nmp": { - "type": "string" + "port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" }, - "redirect_ip": { - "type": "string" + "service" : { + "type" : "string" }, - "redirect_path": { - "type": "string" + "broker_psp_code" : { + "type" : "string" }, - "redirect_port": { - "maximum": 65535, - "minimum": 1, - "type": "integer", - "format": "int64" + "proxy_enabled" : { + "type" : "boolean" }, - "redirect_query_string": { - "type": "string" + "proxy_host" : { + "type" : "string" }, - "redirect_protocol": { - "type": "string", - "enum": [ - "HTTPS", - "HTTP" - ] + "proxy_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" }, - "payment_model": { - "type": "string", - "enum": [ - "IMMEDIATE", - "IMMEDIATE_MULTIBENEFICIARY", - "DEFERRED", - "ACTIVATED_AT_PSP" - ] + "proxy_username" : { + "type" : "string" }, - "serv_plugin": { - "type": "string" + "proxy_password" : { + "type" : "string" }, - "rt_push": { - "type": "boolean" + "target_host" : { + "type" : "string" }, - "on_us": { - "type": "boolean" + "target_port" : { + "type" : "integer", + "format" : "int64" }, - "card_chart": { - "type": "boolean" + "target_path" : { + "type" : "string" }, - "recovery": { - "type": "boolean" + "thread_number" : { + "minimum" : 1, + "type" : "integer", + "format" : "int64" }, - "digital_stamp_brand": { - "type": "boolean" + "timeout_a" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" }, - "flag_io": { - "type": "boolean" + "timeout_b" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" }, - "flag_psp_cp": { - "type": "boolean" + "timeout_c" : { + "minimum" : 0, + "type" : "integer", + "format" : "int64" }, - "agid": { - "type": "boolean" + "nmp_service" : { + "type" : "string" }, - "primitive_version": { - "maximum": 2, - "minimum": 1, - "type": "integer", - "description": "Primitive number version", - "format": "int32" + "new_fault_code" : { + "type" : "boolean" + }, + "target_host_nmp" : { + "type" : "string" + }, + "target_port_nmp" : { + "type" : "integer", + "format" : "int64" + }, + "target_path_nmp" : { + "type" : "string" + }, + "redirect_ip" : { + "type" : "string" + }, + "redirect_path" : { + "type" : "string" + }, + "redirect_port" : { + "maximum" : 65535, + "minimum" : 1, + "type" : "integer", + "format" : "int64" + }, + "redirect_query_string" : { + "type" : "string" + }, + "redirect_protocol" : { + "type" : "string", + "enum" : [ "HTTPS", "HTTP" ] + }, + "payment_model" : { + "type" : "string", + "enum" : [ "IMMEDIATE", "IMMEDIATE_MULTIBENEFICIARY", "DEFERRED", "ACTIVATED_AT_PSP" ] + }, + "serv_plugin" : { + "type" : "string" + }, + "rt_push" : { + "type" : "boolean" + }, + "on_us" : { + "type" : "boolean" + }, + "card_chart" : { + "type" : "boolean" + }, + "recovery" : { + "type" : "boolean" + }, + "digital_stamp_brand" : { + "type" : "boolean" + }, + "flag_io" : { + "type" : "boolean" + }, + "flag_psp_cp" : { + "type" : "boolean" + }, + "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" - } - }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "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" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" }, - "dbConnection": { - "type": "string" + "dbConnection" : { + "type" : "string" } } }, - "IbanEnhanced": { - "required": [ - "ci_owner", - "due_date", - "iban", - "is_active", - "publication_date", - "validity_date" - ], - "type": "object", - "properties": { - "iban": { - "maxLength": 35, - "minLength": 0, - "pattern": "[a-zA-Z]{2}\\d{2}[a-zA-Z0-9]{1,30}", - "type": "string", - "description": "The iban code", - "example": "IT99C0222211111000000000000" - }, - "ci_owner": { - "maxLength": 11, - "minLength": 0, - "type": "string", - "description": "Fiscal code of the Creditor Institution who owns the iban", - "readOnly": true, - "example": "77777777777" - }, - "company_name": { - "maxLength": 100, - "minLength": 0, - "type": "string", - "description": "The Creditor Institution company name", - "readOnly": true, - "example": "Comune di Firenze" - }, - "description": { - "maxLength": 300, - "minLength": 0, - "type": "string", - "description": "The description the Creditor Institution gives to the iban about its usage", - "example": "Riscossione Tributi" - }, - "is_active": { - "type": "boolean", - "description": "True if the iban is active", - "example": true - }, - "validity_date": { - "type": "string", - "description": "The date the Creditor Institution wants the iban to be used for its payments", - "format": "date-time", - "example": "2023-04-01T13:49:19.897Z" - }, - "publication_date": { - "type": "string", - "description": "The date on which the iban has been inserted in the system", - "format": "date-time", - "readOnly": true, - "example": "2023-06-01T23:59:59.999Z" - }, - "due_date": { - "type": "string", - "description": "The date on which the iban will expire", - "format": "date-time", - "example": "2023-12-31T23:59:59.999Z" - }, - "labels": { - "type": "array", - "description": "The labels array associated with the iban", - "items": { - "$ref": "#/components/schemas/IbanLabel" + "IbanEnhanced" : { + "required" : [ "ci_owner", "due_date", "iban", "is_active", "publication_date", "validity_date" ], + "type" : "object", + "properties" : { + "iban" : { + "maxLength" : 35, + "minLength" : 0, + "pattern" : "[a-zA-Z]{2}\\d{2}[a-zA-Z0-9]{1,30}", + "type" : "string", + "description" : "The iban code", + "example" : "IT99C0222211111000000000000" + }, + "ci_owner" : { + "maxLength" : 11, + "minLength" : 0, + "type" : "string", + "description" : "Fiscal code of the Creditor Institution who owns the iban", + "readOnly" : true, + "example" : "77777777777" + }, + "company_name" : { + "maxLength" : 100, + "minLength" : 0, + "type" : "string", + "description" : "The Creditor Institution company name", + "readOnly" : true, + "example" : "Comune di Firenze" + }, + "description" : { + "maxLength" : 300, + "minLength" : 0, + "type" : "string", + "description" : "The description the Creditor Institution gives to the iban about its usage", + "example" : "Riscossione Tributi" + }, + "is_active" : { + "type" : "boolean", + "description" : "True if the iban is active", + "example" : true + }, + "validity_date" : { + "type" : "string", + "description" : "The date the Creditor Institution wants the iban to be used for its payments", + "format" : "date-time", + "example" : "2023-04-01T13:49:19.897Z" + }, + "publication_date" : { + "type" : "string", + "description" : "The date on which the iban has been inserted in the system", + "format" : "date-time", + "readOnly" : true, + "example" : "2023-06-01T23:59:59.999Z" + }, + "due_date" : { + "type" : "string", + "description" : "The date on which the iban will expire", + "format" : "date-time", + "example" : "2023-12-31T23:59:59.999Z" + }, + "labels" : { + "type" : "array", + "description" : "The labels array associated with the iban", + "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" }, - "IbansEnhanced": { - "required": [ - "ibans_enhanced" - ], - "type": "object", - "properties": { - "ibans_enhanced": { - "type": "array", - "description": "List of IBANs associated to the passed creditor institutions", - "items": { - "$ref": "#/components/schemas/IbanEnhanced" + "IbansEnhanced" : { + "required" : [ "ibans_enhanced" ], + "type" : "object", + "properties" : { + "ibans_enhanced" : { + "type" : "array", + "description" : "List of IBANs associated to the passed creditor institutions", + "items" : { + "$ref" : "#/components/schemas/IbanEnhanced" } } } }, - "CreditorInstitutionInfo": { - "required": [ - "business_name", - "ci_tax_code" - ], - "type": "object", - "properties": { - "business_name": { - "type": "string", - "description": "The business name of the creditor institution", - "example": "Comune di Roma" - }, - "ci_tax_code": { - "type": "string", - "description": "The tax code of the creditor institution", - "example": "02438750586" + "CreditorInstitutionInfo" : { + "required" : [ "business_name", "ci_tax_code" ], + "type" : "object", + "properties" : { + "business_name" : { + "type" : "string", + "description" : "The business name of the creditor institution", + "example" : "Comune di Roma" + }, + "ci_tax_code" : { + "type" : "string", + "description" : "The tax code of the creditor institution", + "example" : "02438750586" } } }, - "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" + "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" + "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 - ] + "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" + }, + "is_connection_sync" : { + "type" : "boolean", + "description" : "Describe the station connection's type, true synchronous, false asynchronous" + }, + "create_date" : { + "type" : "string", + "description" : "Station creation date", + "format" : "date-time" + }, + "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" + "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" - } - }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "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" + "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" + "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" + "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" } } } }, - "AvailableCodes": { - "type": "object", - "properties": { - "availableCodes": { - "type": "array", - "description": "List of codes not used for existing associations", - "items": { - "type": "string", - "description": "List of codes not used for existing associations" + "AvailableCodes" : { + "type" : "object", + "properties" : { + "availableCodes" : { + "type" : "array", + "description" : "List of codes not used for existing associations", + "items" : { + "type" : "string", + "description" : "List of codes not used for existing associations" } } } }, - "CreditorInstitutionDetail": { - "required": [ - "broker_code", - "business_name", - "ci_status", - "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" - }, - "endpoint_rt": { - "type": "string", - "description": "endpoint for Ricevuta Telematica" - }, - "endpoint_redirect": { - "type": "string", - "description": "endpoint for Redirect" - }, - "endpoint_mod4": { - "type": "string", - "description": "endpoint for Modello Unico" - }, - "primitive_version": { - "type": "integer", - "description": "Version of the primitive", - "format": "int32" - }, - "ci_status": { - "type": "boolean", - "description": "True if the CI is enabled" + "CreditorInstitutionDetail" : { + "required" : [ "broker_code", "business_name", "ci_status", "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" + }, + "endpoint_rt" : { + "type" : "string", + "description" : "endpoint for Ricevuta Telematica" + }, + "endpoint_redirect" : { + "type" : "string", + "description" : "endpoint for Redirect" + }, + "endpoint_mod4" : { + "type" : "string", + "description" : "endpoint for Modello Unico" + }, + "primitive_version" : { + "type" : "integer", + "description" : "Version of the primitive", + "format" : "int32" + }, + "ci_status" : { + "type" : "boolean", + "description" : "True if the CI is enabled" } }, - "description": "List of creditor institutions associated to the same broker by different stations" + "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" + "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 bb47c912..130a6335 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 17 - 1.20.1 + 1.22.3 1.6.14 21.9.0.0 42.5.5 diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/config/MappingsConfiguration.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/config/MappingsConfiguration.java index dc825c30..dc248d39 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/config/MappingsConfiguration.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/config/MappingsConfiguration.java @@ -6,10 +6,8 @@ import it.gov.pagopa.apiconfig.selfcareintegration.model.creditorinstitution.CreditorInstitutionInfo; import it.gov.pagopa.apiconfig.selfcareintegration.model.iban.IbanDetails; import it.gov.pagopa.apiconfig.selfcareintegration.model.iban.IbanEnhanced; -import it.gov.pagopa.apiconfig.starter.entity.Canali; -import it.gov.pagopa.apiconfig.starter.entity.IbanMaster; -import it.gov.pagopa.apiconfig.starter.entity.Pa; -import it.gov.pagopa.apiconfig.starter.entity.PaStazionePa; +import it.gov.pagopa.apiconfig.selfcareintegration.model.station.StationDetails; +import it.gov.pagopa.apiconfig.starter.entity.*; import org.modelmapper.ModelMapper; import org.modelmapper.convention.MatchingStrategies; import org.springframework.context.annotation.Bean; @@ -34,6 +32,7 @@ ModelMapper modelMapper() { mapper.createTypeMap(Pa.class, CreditorInstitutionInfo.class).setConverter(new ConvertPaToCreditorInstitutionInfo()); mapper.createTypeMap(IbanMaster.class, IbanEnhanced.class).setConverter(new ConvertIbanMasterToIbanDetailsTemp()); + mapper.createTypeMap(Stazioni.class, StationDetails.class).setConverter(new ConvertStazioniToStationDetails()); return mapper; } diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/mapper/ConvertStazioniToStationDetails.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/mapper/ConvertStazioniToStationDetails.java new file mode 100644 index 00000000..efb92718 --- /dev/null +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/mapper/ConvertStazioniToStationDetails.java @@ -0,0 +1,75 @@ +package it.gov.pagopa.apiconfig.selfcareintegration.mapper; + +import it.gov.pagopa.apiconfig.selfcareintegration.model.station.BrokerDetails; +import it.gov.pagopa.apiconfig.selfcareintegration.model.station.Protocol; +import it.gov.pagopa.apiconfig.selfcareintegration.model.station.StationDetails; +import it.gov.pagopa.apiconfig.starter.entity.Stazioni; +import org.modelmapper.Converter; +import org.modelmapper.spi.MappingContext; + +import javax.validation.Valid; + +import static it.gov.pagopa.apiconfig.selfcareintegration.util.Utility.*; + +public class ConvertStazioniToStationDetails implements Converter { + + @Override + public StationDetails convert(MappingContext context) { + @Valid Stazioni source = context.getSource(); + return StationDetails.builder() + .idStazione(source.getIdStazione()) + .enabled(source.getEnabled()) + .versione(source.getVersione()) + .password(source.getPassword()) + .protocollo(Protocol.fromValue(source.getProtocollo())) + .ip(source.getIp()) + .porta(source.getPorta()) + .servizio(source.getServizio()) + .servizioPof(source.getServizioPof()) + .protocollo4Mod( + source.getProtocollo4Mod() != null + ? Protocol.fromValue(source.getProtocollo4Mod()) + : null) + .intermediarioPa(source.getIntermediarioPa() != null ? + BrokerDetails.builder() + .codiceIntermediario(source.getIntermediarioPa().getCodiceIntermediario()) + .idIntermediarioPa(source.getIntermediarioPa().getIdIntermediarioPa()) + .faultBeanEsteso(source.getIntermediarioPa().getFaultBeanEsteso()) + .enabled(source.getIntermediarioPa().getEnabled()) + .build() + : null) + .ip4Mod(source.getIp4Mod()) + .porta4Mod(source.getPorta4Mod()) + .servizio4Mod(source.getServizio4Mod()) + .redirectProtocollo( + source.getRedirectProtocollo() != null + ? Protocol.fromValue(source.getRedirectProtocollo()) + : null) + .redirectIp(source.getRedirectIp()) + .redirectPorta(source.getRedirectPorta()) + .redirectPath(source.getRedirectPath()) + .redirectQueryString(source.getRedirectQueryString()) + .proxyEnabled(source.getProxyEnabled()) + .proxyHost(source.getProxyHost()) + .proxyPort(source.getProxyPort()) + .proxyUsername(source.getProxyUsername()) + .proxyPassword(source.getProxyPassword()) + .targetHost(source.getTargetHost()) + .targetPort(source.getTargetPort()) + .targetPath(source.getTargetPath()) + .targetHostPof(source.getTargetHostPof()) + .targetPortPof(source.getTargetPortPof()) + .targetPathPof(source.getTargetPathPof()) + .flagOnline(source.getFlagOnline()) + .numThread(source.getNumThread()) + .timeoutA(source.getTimeoutA()) + .timeoutB(source.getTimeoutB()) + .timeoutC(source.getTimeoutC()) + .invioRtIstantaneo(source.getInvioRtIstantaneo()) + .versionePrimitive(source.getVersionePrimitive()) + .isConnectionSync(isConnectionSync(source)) + .createDate(toOffsetDateTime(source.getDataCreazione())) + .build(); + } + +} diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/Station.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/Station.java index d2e88d3f..61cf5c9b 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/Station.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/Station.java @@ -1,19 +1,27 @@ package it.gov.pagopa.apiconfig.selfcareintegration.model.station; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.ser.OffsetDateTimeSerializer; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; + +import it.gov.pagopa.apiconfig.selfcareintegration.util.Constants; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.OffsetDateTime; /** Station */ @Data @@ -47,4 +55,16 @@ public class Station { @Schema(description = "The version of the station") @NotNull private Long versione; + + @Schema(description = "Describe the station connection's type, true synchronous, false asynchronous") + @JsonProperty("is_connection_sync") + private Boolean isConnectionSync; + + @JsonProperty("create_date") + @Schema(description = "Station creation date") + @JsonFormat(pattern = Constants.DateTimeFormat.DATE_TIME_FORMAT) + @JsonSerialize(using = OffsetDateTimeSerializer.class) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime createDate; + } diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/StationDetails.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/StationDetails.java index 7e66715f..17cd46b0 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/StationDetails.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/model/station/StationDetails.java @@ -1,19 +1,27 @@ package it.gov.pagopa.apiconfig.selfcareintegration.model.station; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.ser.OffsetDateTimeSerializer; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; + +import it.gov.pagopa.apiconfig.selfcareintegration.util.Constants; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.OffsetDateTime; /** StationDetails */ @EqualsAndHashCode(callSuper = true) @@ -185,4 +193,5 @@ public class StationDetails extends Station { allowableValues = {"1", "2"}) @JsonProperty("primitive_version") private Integer versionePrimitive; + } diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/util/Utility.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/util/Utility.java index f24dd97c..b453dacc 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/util/Utility.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/util/Utility.java @@ -1,8 +1,13 @@ package it.gov.pagopa.apiconfig.selfcareintegration.util; import it.gov.pagopa.apiconfig.selfcareintegration.model.PageInfo; +import it.gov.pagopa.apiconfig.starter.entity.Stazioni; +import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.Page; +import java.sql.Timestamp; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Optional; public class Utility { @@ -31,4 +36,28 @@ public static String deNull(Object value) { public static Boolean deNull(Boolean value) { return Optional.ofNullable(value).orElse(false); } + + /** + * Compute the station's connection flag + * + * @param station station model + * @return true if the station is configured to be synchronous, false otherwise + */ + public static boolean isConnectionSync(Stazioni station) { + return (StringUtils.isNotBlank(station.getTargetPath()) && StringUtils.isNotBlank(station.getRedirectIp())) + || StringUtils.isNotBlank(station.getTargetPathPof()); + } + + /** + * @param timestamp {@link Timestamp} to convert + * @return convert timestamp to {@link OffsetDateTime} + */ + public static OffsetDateTime toOffsetDateTime(Timestamp timestamp) { + return timestamp != null + ? OffsetDateTime.of(timestamp.toLocalDateTime(), ZoneOffset.UTC) + : null; + } + + + } diff --git a/src/test/resources/response/get_broker_stations_details_ok1.json b/src/test/resources/response/get_broker_stations_details_ok1.json index d7751111..0bacab0d 100644 --- a/src/test/resources/response/get_broker_stations_details_ok1.json +++ b/src/test/resources/response/get_broker_stations_details_ok1.json @@ -36,7 +36,8 @@ "target_host_pof": "localhost", "target_port_pof": 443, "target_path_pof": "/", - "primitive_version": 1 + "primitive_version": 1, + "is_connection_sync": true } ], "page_info": { diff --git a/src/test/resources/response/get_creditorinstitution_stations_details_ok1.json b/src/test/resources/response/get_creditorinstitution_stations_details_ok1.json index d7751111..0bacab0d 100644 --- a/src/test/resources/response/get_creditorinstitution_stations_details_ok1.json +++ b/src/test/resources/response/get_creditorinstitution_stations_details_ok1.json @@ -36,7 +36,8 @@ "target_host_pof": "localhost", "target_port_pof": 443, "target_path_pof": "/", - "primitive_version": 1 + "primitive_version": 1, + "is_connection_sync": true } ], "page_info": {