From f41d765c0e2119db896c20602f5f2f62068ebe6d Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:24:39 +0200 Subject: [PATCH 01/11] s --- openapi/openapi-v1.json | 510 ---------------------------------------- 1 file changed, 510 deletions(-) diff --git a/openapi/openapi-v1.json b/openapi/openapi-v1.json index 3ec5c640..e69de29b 100644 --- a/openapi/openapi-v1.json +++ b/openapi/openapi-v1.json @@ -1,510 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.31" - }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" - } - } - }, - "required": true - }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" - } - } - } - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" - } - } - }, - "required": true - }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" - } - } - } - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - } - }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" - } - } - } - }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "digitalStamp": { - "type": "boolean" - } - } - }, - "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" - } - } - }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - } - } - }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "bundleName": { - "type": "string" - }, - "bundleDescription": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "onUs": { - "type": "boolean" - }, - "abi": { - "type": "string" - }, - "pspBusinessName": { - "type": "string" - } - } - }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" - } - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" - } - } - } - }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - } - } - }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - } - } - } - }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } - } - } -} From 5d58228cc4cfef8077a48e3c20eb5cc25c803066 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:11:54 +0100 Subject: [PATCH 02/11] feat: returning cheapest bundle for each psp PAGOPA-2348 --- openapi/openapi-node-v1.json | 729 +++++---- openapi/openapi-node-v2.json | 813 +++++----- openapi/openapi-v1-dev-uat.json | 1341 ++++++++--------- openapi/openapi-v1.json | 729 +++++---- openapi/openapi-v2.json | 813 +++++----- .../calculator/service/CalculatorService.java | 19 +- 6 files changed, 2130 insertions(+), 2314 deletions(-) diff --git a/openapi/openapi-node-v1.json b/openapi/openapi-node-v1.json index 47f662fc..1f1612c2 100644 --- a/openapi/openapi-node-v1.json +++ b/openapi/openapi-node-v1.json @@ -1,510 +1,481 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.32" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.32" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" } } }, - "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" + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" } } }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "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" } } } }, - "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" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-node-v2.json b/openapi/openapi-node-v2.json index bf335cb4..6120d8ff 100644 --- a/openapi/openapi-node-v2.json +++ b/openapi/openapi-node-v2.json @@ -1,548 +1,513 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.32" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.32" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId": "getFeesByPspMulti", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId" : "getFeesByPspMulti", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPspMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId": "getFeesMulti", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId" : "getFeesMulti", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionMulti" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentNoticeItem": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "components" : { + "schemas" : { + "PaymentNoticeItem" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" + } + } + }, + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Fee": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" - }, - "actualCiIncurredFee": { - "type": "integer", - "format": "int64" + "Fee" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualCiIncurredFee" : { + "type" : "integer", + "format" : "int64" } } }, - "Transfer": { - "required": [ - "fees" - ], - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "actualPayerFee": { - "type": "integer", - "format": "int64" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "bundleName": { - "type": "string" - }, - "bundleDescription": { - "type": "string" - }, - "idsCiBundle": { - "type": "array", - "items": { - "type": "string" + "Transfer" : { + "required" : [ "fees" ], + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "bundleName" : { + "type" : "string" + }, + "bundleDescription" : { + "type" : "string" + }, + "idsCiBundle" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" + "fees" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Fee" } } } }, - "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" - } - } - }, - "PaymentOptionMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "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" } } } }, - "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" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-v1-dev-uat.json b/openapi/openapi-v1-dev-uat.json index 61301a2f..06c33c77 100644 --- a/openapi/openapi-v1-dev-uat.json +++ b/openapi/openapi-v1-dev-uat.json @@ -1,505 +1,466 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.32" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.32" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + }, { + "name" : "Configuration", + "description" : "Utility Services" + }, { + "name" : "Actuator", + "description" : "Monitor and interact", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - }, - { - "name": "Configuration", - "description": "Utility Services" - }, - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/configuration/touchpoint/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" + "/configuration/touchpoint/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/touchpoint/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" + "/configuration/touchpoint/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/paymenttypes/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deletePaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" + "/configuration/paymenttypes/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deletePaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/paymenttypes/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addPaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" + "/configuration/paymenttypes/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addPaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/bundles/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "/configuration/bundles/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/bundles/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "/configuration/bundles/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "/actuator" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator root web endpoint", + "operationId" : "links", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" } } } }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" } } } }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" } } } @@ -509,30 +470,28 @@ } } }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" + "/actuator/info" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'info'", + "operationId" : "info", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" } }, - "application/json": { - "schema": { - "type": "object" + "application/json" : { + "schema" : { + "type" : "object" } } } @@ -540,30 +499,28 @@ } } }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health'", - "operationId": "health", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" + "/actuator/health" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health'", + "operationId" : "health", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" } }, - "application/json": { - "schema": { - "type": "object" + "application/json" : { + "schema" : { + "type" : "object" } } } @@ -571,30 +528,28 @@ } } }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" + "/actuator/health/**" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health-path'", + "operationId" : "health-path", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" } }, - "application/json": { - "schema": { - "type": "object" + "application/json" : { + "schema" : { + "type" : "object" } } } @@ -603,389 +558,365 @@ } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" } } }, - "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" + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" } } }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" } } }, - "Touchpoint": { - "type": "object", - "properties": { - "id": { - "type": "string" + "Touchpoint" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "name": { - "type": "string" + "name" : { + "type" : "string" }, - "creationDate": { - "type": "string", - "format": "date-time" + "creationDate" : { + "type" : "string", + "format" : "date-time" } } }, - "PaymentType": { - "required": [ - "id", - "name" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdDate": { - "type": "string", - "format": "date-time" + "PaymentType" : { + "required" : [ "id", "name" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "createdDate" : { + "type" : "string", + "format" : "date-time" } } }, - "CiBundle": { - "required": [ - "ciFiscalCode", - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "CiBundle" : { + "required" : [ "ciFiscalCode", "id" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "ciFiscalCode": { - "type": "string" + "ciFiscalCode" : { + "type" : "string" }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundleAttribute" + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundleAttribute" } } } }, - "CiBundleAttribute": { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" - }, - "transferCategory": { - "type": "string" - }, - "transferCategoryRelation": { - "type": "string", - "enum": [ - "EQUAL", - "NOT_EQUAL" - ] + "CiBundleAttribute" : { + "required" : [ "id" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "transferCategory" : { + "type" : "string" + }, + "transferCategoryRelation" : { + "type" : "string", + "enum" : [ "EQUAL", "NOT_EQUAL" ] } } }, - "ValidBundle": { - "required": [ - "digitalStamp", - "digitalStampRestriction" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "ValidBundle" : { + "required" : [ "digitalStamp", "digitalStampRestriction" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" }, - "name": { - "type": "string" + "name" : { + "type" : "string" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "minPaymentAmount": { - "type": "integer", - "format": "int64" + "minPaymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "paymentType": { - "type": "string" + "paymentType" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "type": { - "type": "string", - "enum": [ - "GLOBAL", - "PUBLIC", - "PRIVATE" - ] + "type" : { + "type" : "string", + "enum" : [ "GLOBAL", "PUBLIC", "PRIVATE" ] }, - "transferCategoryList": { - "type": "array", - "items": { - "type": "string" + "transferCategoryList" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" }, - "digitalStampRestriction": { - "type": "boolean" + "digitalStampRestriction" : { + "type" : "boolean" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "ciBundleList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundle" + "ciBundleList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundle" } } } }, - "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" } } }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" + "Link" : { + "type" : "object", + "properties" : { + "href" : { + "type" : "string" }, - "templated": { - "type": "boolean" + "templated" : { + "type" : "boolean" } } } }, - "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" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-v1.json b/openapi/openapi-v1.json index 47f662fc..1f1612c2 100644 --- a/openapi/openapi-v1.json +++ b/openapi/openapi-v1.json @@ -1,510 +1,481 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.32" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.32" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" } } }, - "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" + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" } } }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "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" } } } }, - "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" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-v2.json b/openapi/openapi-v2.json index bf335cb4..6120d8ff 100644 --- a/openapi/openapi-v2.json +++ b/openapi/openapi-v2.json @@ -1,548 +1,513 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.32" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.32" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId": "getFeesByPspMulti", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId" : "getFeesByPspMulti", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPspMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId": "getFeesMulti", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId" : "getFeesMulti", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionMulti" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentNoticeItem": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "components" : { + "schemas" : { + "PaymentNoticeItem" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" + } + } + }, + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Fee": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" - }, - "actualCiIncurredFee": { - "type": "integer", - "format": "int64" + "Fee" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualCiIncurredFee" : { + "type" : "integer", + "format" : "int64" } } }, - "Transfer": { - "required": [ - "fees" - ], - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "actualPayerFee": { - "type": "integer", - "format": "int64" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "bundleName": { - "type": "string" - }, - "bundleDescription": { - "type": "string" - }, - "idsCiBundle": { - "type": "array", - "items": { - "type": "string" + "Transfer" : { + "required" : [ "fees" ], + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "bundleName" : { + "type" : "string" + }, + "bundleDescription" : { + "type" : "string" + }, + "idsCiBundle" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" + "fees" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Fee" } } } }, - "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" - } - } - }, - "PaymentOptionMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "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" } } } }, - "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" } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java b/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java index 5775b556..74cd36e6 100644 --- a/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java +++ b/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java @@ -138,7 +138,7 @@ private List calculateTaxPayerFee( private List calculateTaxPayerFeeMulti( PaymentOptionMulti paymentOption, int limit, List bundles) { - List transfers = new ArrayList<>(); + Map pspTransfersMap = new HashMap<>(); // 1. Check if ONUS payment: // - ONUS payment = if the bundle ABI attribute matching the one extracted via BIN from the @@ -168,15 +168,18 @@ private List calcul // 2.a: if ONUS payment -> return the transfer list only for bundles with the idChannel // attribute ending in '_ONUS' if (isOnusPaymentType && isOnusBundle(bundle)) { - transfers.addAll(this.getTransferList(paymentOption, bundle)); + addToPspTransfersMap(pspTransfersMap, this.getTransferList(paymentOption, bundle)); } // 2.b: if not ONUS payment -> return the transfer list only for bundles with the idChannel // attribute NOT ending in '_ONUS' if (!isOnusPaymentType && !isOnusBundle(bundle)) { - transfers.addAll(this.getTransferList(paymentOption, bundle)); + addToPspTransfersMap(pspTransfersMap, this.getTransferList(paymentOption, bundle)); } } + // convert mapping of psp and transfer to transfer list + List transfers = new ArrayList<>(pspTransfersMap.values()); + // if it is a payment on the AMEX circuit --> filter to return only AMEX_ONUS if (this.isAMEXAbi(issuers)) { Predicate abiPredicate = t -> amexABI.equalsIgnoreCase(t.getAbi()); @@ -518,6 +521,16 @@ private boolean isBelowThreshold(long paymentAmount) { return paymentAmount < Long.parseLong(StringUtils.trim(amountThreshold)); } + private void addToPspTransfersMap(Map pspTransferMap, + List transferList) { + for(it.gov.pagopa.afm.calculator.model.calculatormulti.Transfer transfer : transferList) { + if(!pspTransferMap.containsKey(transfer.getIdPsp()) || + pspTransferMap.get(transfer.getIdPsp()).getActualPayerFee() > transfer.getActualPayerFee()) { + pspTransferMap.put(transfer.getIdPsp(), transfer); + } + } + } + /** * sort by bundles' fee grouped by PSP * From c305a19717aec2e8612fd5ed488085f99956ba38 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:25:08 +0100 Subject: [PATCH 03/11] PAGOPA-2348 add integration tests --- integration-test/src/config/data.json | 108 +++++++++++++++--- .../src/features/getFeesMulti.feature | 91 +++++++++++++-- 2 files changed, 171 insertions(+), 28 deletions(-) diff --git a/integration-test/src/config/data.json b/integration-test/src/config/data.json index d034dd9e..4d47914f 100644 --- a/integration-test/src/config/data.json +++ b/integration-test/src/config/data.json @@ -18,7 +18,8 @@ "touchpoint": "ANY", "paymentType": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-1" + "pspBusinessName": "psp business name int-test-1", + "cart" : true }, { "id": "int-test-2", @@ -38,7 +39,8 @@ "validityDateTo": null, "touchpoint": "ANY", "abi": 14156, - "pspBusinessName": "psp business name int-test-2" + "pspBusinessName": "psp business name int-test-2", + "cart" : true }, { "id": "int-test-3", @@ -59,7 +61,8 @@ "validityDateTo": null, "touchpoint": "ANY", "abi": 14156, - "pspBusinessName": "psp business name int-test-3" + "pspBusinessName": "psp business name int-test-3", + "cart" : true }, { "id": "int-test-4", @@ -82,7 +85,8 @@ "validityDateFrom": null, "validityDateTo": null, "touchpoint": "ANY", - "paymentType": null + "paymentType": null, + "cart" : true }, { "id": "int-test-5", @@ -107,7 +111,8 @@ "validityDateFrom": null, "validityDateTo": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-5" + "pspBusinessName": "psp business name int-test-5", + "cart" : true }, { "id": "int-test-6", @@ -127,7 +132,8 @@ "validityDateTo": null, "paymentType": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-6" + "pspBusinessName": "psp business name int-test-6", + "cart" : true }, { "id": "int-test-7", @@ -147,7 +153,8 @@ "validityDateTo": null, "paymentType": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-7" + "pspBusinessName": "psp business name int-test-7", + "cart" : true }, { "id": "int-test-8", @@ -167,7 +174,8 @@ "validityDateTo": null, "paymentType": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-8" + "pspBusinessName": "psp business name int-test-8", + "cart" : true }, { "id": "int-test-9", @@ -187,7 +195,8 @@ "validityDateTo": null, "paymentType": null, "abi": 14156, - "pspBusinessName": "psp business name int-test-9" + "pspBusinessName": "psp business name int-test-9", + "cart" : true }, { "id": "int-test-10", @@ -207,7 +216,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": "AMREX", - "pspBusinessName": "psp business name int-test-10" + "pspBusinessName": "psp business name int-test-10", + "cart" : true }, { "id": "int-test-cart-cart-1", @@ -227,7 +237,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-1" + "pspBusinessName": "psp business name int-test-cart-1", + "cart" : true }, { "id": "int-test-cart-cart-2", @@ -247,7 +258,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-2" + "pspBusinessName": "psp business name int-test-cart-2", + "cart" : true }, { "id": "int-test-cart-cart-3", @@ -267,7 +279,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-3" + "pspBusinessName": "psp business name int-test-cart-3", + "cart" : true }, { "id": "int-test-cart-cart-4", @@ -287,7 +300,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-4" + "pspBusinessName": "psp business name int-test-cart-4", + "cart" : true }, { "id": "int-test-cart-cart-5", @@ -307,7 +321,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-5" + "pspBusinessName": "psp business name int-test-cart-5", + "cart" : true }, { "id": "int-test-cart-cart-6", @@ -327,7 +342,8 @@ "touchpoint": "ANY", "paymentType": "CP", "abi": 14156, - "pspBusinessName": "psp business name int-test-cart-6" + "pspBusinessName": "psp business name int-test-cart-6", + "cart" : true }, { "id": "int-test-cart-cart-7", @@ -347,7 +363,50 @@ "touchpoint": "ANY", "paymentType": null, "abi": 10101, - "pspBusinessName": "psp business name int-test-cart-7" + "pspBusinessName": "psp business name int-test-cart-7", + "cart" : true + }, + { + "id": "int-test-cart-cart-8", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 8", + "description": "pacchetto 8", + "paymentAmount": 100, + "minPaymentAmount": 899999999999986, + "maxPaymentAmount": 899999999999988, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-8", + "cart" : true + }, + { + "id": "int-test-cart-cart-9", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 9", + "description": "pacchetto 9", + "paymentAmount": 150, + "minPaymentAmount": 899999999999986, + "maxPaymentAmount": 899999999999988, + "type": "PRIVATE", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-9", + "cart" : true } ], "ciBundles": [ @@ -479,7 +538,7 @@ "maxPaymentAmount": 20 }, { - "id": "int-test-cart-cart-10", + "id": "int-test-cart-10", "maxPaymentAmount": 40 } ] @@ -490,10 +549,21 @@ "idBundle": "int-test-cart-cart-7", "attributes": [ { - "id": "int-test-cart-9", + "id": "int-test-cart-11", "maxPaymentAmount": 20 } ] + }, + { + "id": "int-test-cart-10", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-9", + "attributes": [ + { + "id": "int-test-cart-12", + "maxPaymentAmount": 60 + } + ] } ], "touchpoints": [ diff --git a/integration-test/src/features/getFeesMulti.feature b/integration-test/src/features/getFeesMulti.feature index b6336e8a..e3370a6a 100644 --- a/integration-test/src/features/getFeesMulti.feature +++ b/integration-test/src/features/getFeesMulti.feature @@ -280,19 +280,92 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | - | true | - | true | - | true | | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | + + Scenario: Multiple ciBundles and multiple paymentNoticeItems + Given initial json + """ + { + "bin": "309500", + "paymentMethod": "CP", + "touchpoint": "CHECKOUT", + "idPspList": null, + "paymentNotice": [ + { + "primaryCreditorInstitution": "77777777777", + "paymentAmount": 899999999998991, + "transferList": [ + { + "creditorInstitution": "77777777777", + "transferCategory": "TAX1" + } + ] + }, + { + "primaryCreditorInstitution": "88888888888", + "paymentAmount": 1000, + "transferList": [ + { + "creditorInstitution": "88888888888", + "transferCategory": "TAX1" + } + ] + } + ] + } + """ + When the client send a V2 POST to /fees + Then check statusCode is 200 + And the body response ordering for the bundleOptions.onUs field is: + | onUs | + | true | + | false | + And the body response for the bundleOptions.idsCiBundle field is: + | idCiBundle1 | idCiBundle2 | + | "int-test-cart-5" | "int-test-cart-6" | + And the sum of the fees is correct and the EC codes are: + | feeCode1 | feeCode2 | + | "77777777777" | "88888888888" | + + Scenario: Multiple ciBundles and multiple paymentNoticeItems + Given initial json + """ + { + "bin": "309500", + "paymentMethod": "CP", + "touchpoint": "CHECKOUT", + "idPspList": null, + "paymentNotice": [ + { + "primaryCreditorInstitution": "77777777777", + "paymentAmount": 899999999999987, + "transferList": [ + { + "creditorInstitution": "77777777777", + "transferCategory": "TAX1" + } + ] + } + ] + } + """ + When the client send a V2 POST to /fees + Then check statusCode is 200 + And the body response ordering for the bundleOptions.onUs field is: + | onUs | + | true | + | false | + And the body response for the bundleOptions.idsCiBundle field is: + | idCiBundle | + | "int-test-cart-10" | + | "int-test-cart-9" | + And the sum of the fees is correct and the EC codes are: + | feeCode | + | "77777777777" | + | "77777777777" | From 36273e5fc299d6618d34c29d0d8a27c9b5473794 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:07:42 +0100 Subject: [PATCH 04/11] PAGOPA-2348 add junit test to increase coverage --- .../gov/pagopa/afm/calculator/TestUtil.java | 45 +++++++++++++++++++ .../service/CalculatorServiceTest.java | 17 +++++++ .../requests/getFeesMultiSamePsp.json | 18 ++++++++ .../responses/getFeesMultiSamePsp.json | 28 ++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 src/test/resources/requests/getFeesMultiSamePsp.json create mode 100644 src/test/resources/responses/getFeesMultiSamePsp.json diff --git a/src/test/java/it/gov/pagopa/afm/calculator/TestUtil.java b/src/test/java/it/gov/pagopa/afm/calculator/TestUtil.java index e9169778..f284d898 100644 --- a/src/test/java/it/gov/pagopa/afm/calculator/TestUtil.java +++ b/src/test/java/it/gov/pagopa/afm/calculator/TestUtil.java @@ -283,6 +283,51 @@ public static List getMockMultipleValidBundle() { return bundles; } + public static List getMockMultipleValidBundleSamePsp() { + List bundles = new ArrayList<>(); + bundles.add( + ValidBundle.builder() + .id("1") + .idChannel("13212880150_01") + .name("bundle1") + .idPsp("ABC") + .pspBusinessName("psp business name") + .abi("14160") + .paymentAmount(50L) + .minPaymentAmount(0L) + .maxPaymentAmount(1000L) + .type(BundleType.GLOBAL) + .touchpoint("1") + .paymentType("CP") + .transferCategoryList(List.of("TAX1")) + .ciBundleList(new ArrayList<>()) + .digitalStamp(false) + .digitalStampRestriction(false) + .onUs(true) + .build()); + bundles.add( + ValidBundle.builder() + .id("2") + .idChannel("13212880150_02_ONUS") + .name("bundle2") + .idPsp("ABC") + .pspBusinessName("psp business name") + .abi("14156") + .paymentAmount(55L) + .minPaymentAmount(0L) + .maxPaymentAmount(1000L) + .type(BundleType.PUBLIC) + .touchpoint("1") + .paymentType("CP") + .transferCategoryList(List.of("TAX2")) + .ciBundleList(Collections.singletonList(getMockCiBundle())) + .digitalStamp(false) + .digitalStampRestriction(false) + .onUs(true) + .build()); + return bundles; + } + public static Touchpoint getMockTouchpoints() { return Touchpoint.builder().id("1").name("CHECKOUT").creationDate(LocalDateTime.now()).build(); } diff --git a/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java b/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java index f3f378bb..0607e581 100644 --- a/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java +++ b/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java @@ -769,4 +769,21 @@ void calculateMultiFullCommission() throws IOException, JSONException { String expected = TestUtil.readStringFromFile("responses/getFeesMultiWrongEC.json"); JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT); } + + @Test + @Order(28) + void calculateMultiMultipleBundlesOneOutput() throws IOException, JSONException { + CosmosRepository cosmosRepository = Mockito.mock(CosmosRepository.class); + calculatorService.setCosmosRepository(cosmosRepository); + + List validBundles = TestUtil.getMockMultipleValidBundleSamePsp(); + Mockito.doReturn(validBundles).when(cosmosRepository).findByPaymentOption(any(PaymentOptionMulti.class), any(Boolean.class)); + + var paymentOption = TestUtil.readObjectFromFile("requests/getFeesMultiSamePsp.json", PaymentOptionMulti.class); + var result = calculatorService.calculateMulti(paymentOption, 10, true); + String actual = TestUtil.toJson(result); + + String expected = TestUtil.readStringFromFile("responses/getFeesMultiSamePsp.json"); + JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT); + } } diff --git a/src/test/resources/requests/getFeesMultiSamePsp.json b/src/test/resources/requests/getFeesMultiSamePsp.json new file mode 100644 index 00000000..c6e9e831 --- /dev/null +++ b/src/test/resources/requests/getFeesMultiSamePsp.json @@ -0,0 +1,18 @@ +{ + "bin": "1005066", + "paymentMethod": "CP", + "touchpoint": "CHECKOUT", + "idPspList": [], + "paymentNotice": [ + { + "primaryCreditorInstitution": "77777777777", + "paymentAmount": 70, + "transferList": [ + { + "creditorInstitution": "77777777777", + "transferCategory": "TAX1" + } + ] + } + ] +} diff --git a/src/test/resources/responses/getFeesMultiSamePsp.json b/src/test/resources/responses/getFeesMultiSamePsp.json new file mode 100644 index 00000000..a00935e4 --- /dev/null +++ b/src/test/resources/responses/getFeesMultiSamePsp.json @@ -0,0 +1,28 @@ +{ + "belowThreshold": false, + "bundleOptions": [ + { + "taxPayerFee": 55, + "actualPayerFee": 45, + "paymentMethod": "CP", + "touchpoint": "1", + "idBundle": "2", + "bundleName": "bundle2", + "bundleDescription": null, + "idsCiBundle": ["1"], + "idPsp": "ABC", + "idChannel": "13212880150_02_ONUS", + "idBrokerPsp": null, + "onUs": true, + "abi": "14156", + "pspBusinessName": "psp business name", + "fees": [ + { + "creditorInstitution" : "77777777777", + "primaryCiIncurredFee": 10, + "actualCiIncurredFee": 10 + } + ] + } + ] +} From 65d39031fc76b483cb208b548c5565f878a9e0be Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:58:28 +0100 Subject: [PATCH 05/11] PAGOPA-2348 add cart parameter to bundle --- src/main/java/it/gov/pagopa/afm/calculator/entity/Bundle.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/it/gov/pagopa/afm/calculator/entity/Bundle.java b/src/main/java/it/gov/pagopa/afm/calculator/entity/Bundle.java index 287a2c16..55aa4c69 100644 --- a/src/main/java/it/gov/pagopa/afm/calculator/entity/Bundle.java +++ b/src/main/java/it/gov/pagopa/afm/calculator/entity/Bundle.java @@ -59,4 +59,7 @@ public class Bundle { // useful only if paymentType = CP private Boolean onUs; + + // useful to see if a bundle available for carts + private Boolean cart; } From b465dd555258d9af9c6c54c126647a09a9d69669 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:22:39 +0100 Subject: [PATCH 06/11] PAGOPA-2348 fix scenario --- integration-test/src/features/getFeesMulti.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/features/getFeesMulti.feature b/integration-test/src/features/getFeesMulti.feature index e3370a6a..17012237 100644 --- a/integration-test/src/features/getFeesMulti.feature +++ b/integration-test/src/features/getFeesMulti.feature @@ -333,7 +333,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | - Scenario: Multiple ciBundles and multiple paymentNoticeItems + Scenario: Multiple bundles are available, but only one per psp is returned Given initial json """ { From 75e867c259939d03ffb02a2c2ad32fd73a696a6f Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:55:47 +0100 Subject: [PATCH 07/11] PAGOPA-2348 fix integration test with new step --- .../src/features/getFeesByPspMulti.feature | 51 ++++++++++++++++--- .../src/features/getFeesMulti.feature | 9 ++++ .../src/step_definitions/support/steps.js | 9 ++++ 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/integration-test/src/features/getFeesByPspMulti.feature b/integration-test/src/features/getFeesByPspMulti.feature index a2e9d0dd..c83a21ba 100644 --- a/integration-test/src/features/getFeesByPspMulti.feature +++ b/integration-test/src/features/getFeesByPspMulti.feature @@ -26,6 +26,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | | "int-test-cart-1" | @@ -56,6 +57,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | | "int-test-cart-2" | @@ -96,6 +98,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | And the sum of the fees is correct and the EC codes are: @@ -134,6 +137,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | And the sum of the fees is correct and the EC codes are: @@ -162,6 +166,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | | "int-test-cart-6" | @@ -202,6 +207,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | | "int-test-cart-5" | "int-test-cart-6" | @@ -242,15 +248,48 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /psps/PPAYITR1XXX/fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | - | "int-test-cart-7" | "int-test-cart-8" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | - | "77777777777" | "88888888888" | + + Scenario: Multiple bundles are available, but only one is returned + Given initial json + """ + { + "bin": "309500", + "paymentMethod": "CP", + "touchpoint": "CHECKOUT", + "idPspList": null, + "paymentNotice": [ + { + "primaryCreditorInstitution": "77777777777", + "paymentAmount": 899999999999987, + "transferList": [ + { + "creditorInstitution": "77777777777", + "transferCategory": "TAX1" + } + ] + } + ] + } + """ + When the client send a V2 POST to /psps/PPAYITR1XXX/fees + Then check statusCode is 200 + And the body response has one bundle for each psp + And the body response ordering for the bundleOptions.onUs field is: + | onUs | + | true | + | false | + And the body response for the bundleOptions.idsCiBundle field is: + | idCiBundle | + | "int-test-cart-10" | + | "int-test-cart-9" | + And the sum of the fees is correct and the EC codes are: + | feeCode | + | "77777777777" | + | "77777777777" | diff --git a/integration-test/src/features/getFeesMulti.feature b/integration-test/src/features/getFeesMulti.feature index 17012237..01436c26 100644 --- a/integration-test/src/features/getFeesMulti.feature +++ b/integration-test/src/features/getFeesMulti.feature @@ -27,6 +27,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -64,6 +65,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -111,6 +113,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -154,6 +157,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -187,6 +191,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -232,6 +237,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -277,6 +283,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -322,6 +329,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | @@ -357,6 +365,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint """ When the client send a V2 POST to /fees Then check statusCode is 200 + And the body response has one bundle for each psp And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | diff --git a/integration-test/src/step_definitions/support/steps.js b/integration-test/src/step_definitions/support/steps.js index bab54506..a262e499 100644 --- a/integration-test/src/step_definitions/support/steps.js +++ b/integration-test/src/step_definitions/support/steps.js @@ -121,6 +121,15 @@ Then('the body response ordering for the bundleOptions.onUs field is:', function } }); +Then('the body response has one bundle for each psp', function () { + const idPsps = []; + for (let i=0; i Date: Fri, 8 Nov 2024 11:59:51 +0100 Subject: [PATCH 08/11] PAGOPA-2348 fix integration test scenario --- integration-test/src/features/getFeesByPspMulti.feature | 3 --- 1 file changed, 3 deletions(-) diff --git a/integration-test/src/features/getFeesByPspMulti.feature b/integration-test/src/features/getFeesByPspMulti.feature index c83a21ba..d4f44c11 100644 --- a/integration-test/src/features/getFeesByPspMulti.feature +++ b/integration-test/src/features/getFeesByPspMulti.feature @@ -284,12 +284,9 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint And the body response ordering for the bundleOptions.onUs field is: | onUs | | true | - | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | | "int-test-cart-10" | - | "int-test-cart-9" | And the sum of the fees is correct and the EC codes are: | feeCode | | "77777777777" | - | "77777777777" | From 2e6a0f2e4d61ccc576081b441883fceea029ae76 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:27:48 +0100 Subject: [PATCH 09/11] PAGOPA-2348 fix integration test old scenario --- integration-test/src/features/getFees.feature | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/integration-test/src/features/getFees.feature b/integration-test/src/features/getFees.feature index 4da5d0a2..af692ca5 100644 --- a/integration-test/src/features/getFees.feature +++ b/integration-test/src/features/getFees.feature @@ -79,7 +79,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint "bin": "309500", "paymentMethod": "CP", "touchpoint": null, - "idPspList": [{"idPsp":"88888888889"}], + "idPspList": [{"idPsp":"PPAYITR1XXX"}], "transferList": [ { "creditorInstitution": "77777777777", @@ -96,12 +96,8 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response ordering for the bundleOptions.onUs field is: | onUs | + | true | | false | - | false | - | false | - | false | - | true | - Scenario: Get List of fees by CI, amount, touchpoint and single PSP @@ -113,7 +109,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint "bin": "309500", "paymentMethod": null, "touchpoint": "IO", - "idPspList": [{"idPsp":"88888888888"}], + "idPspList": [{"idPsp":"PPAYITR1XXX"}], "transferList": [ { "creditorInstitution": "77777777777", @@ -130,8 +126,8 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response ordering for the bundleOptions.onUs field is: | onUs | + | true | | false | - | true | | false | @@ -195,7 +191,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint "bin": "309500", "paymentMethod": null, "touchpoint": "IO", - "idPspList": [{"idPsp":"88888888889"}], + "idPspList": [{"idPsp":"BPPIITRRXXX"}], "transferList": [ { "creditorInstitution": "77777777777", @@ -280,13 +276,6 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response ordering for the bundleOptions.onUs field is: | onUs | - | false | - | false | - | false | - | false | - | false | - | false | - | false | Scenario: Execute a GetFees request with allCcp flag set to false Given initial json From 50b93d6c986f4368d99e05e5c1a52d118398aa77 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:48:54 +0100 Subject: [PATCH 10/11] PAGOPA-2348 adding scenario and change datatable cycle --- .../src/features/getFeesMulti.feature | 35 +++++++++++++++++++ .../src/step_definitions/support/steps.js | 11 +++--- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/integration-test/src/features/getFeesMulti.feature b/integration-test/src/features/getFeesMulti.feature index 01436c26..7072f5f6 100644 --- a/integration-test/src/features/getFeesMulti.feature +++ b/integration-test/src/features/getFeesMulti.feature @@ -41,6 +41,41 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | "77777777777" | | "77777777777" | + Scenario: Commission is higher than the sum of the fees with one psp + Given initial json + """ + { + "bin": "309500", + "paymentMethod": "CP", + "touchpoint": "CHECKOUT", + "idPspList": [{"idPsp":"PPAYITR1XXX"}], + "paymentNotice": [ + { + "primaryCreditorInstitution": "77777777777", + "paymentAmount": 899999999999999, + "transferList": [ + { + "creditorInstitution": "77777777777", + "transferCategory": "TAX1" + } + ] + } + ] + } + """ + When the client send a V2 POST to /fees + Then check statusCode is 200 + And the body response has one bundle for each psp + And the body response ordering for the bundleOptions.onUs field is: + | onUs | + | true | + And the body response for the bundleOptions.idsCiBundle field is: + | idCiBundle | + | "int-test-cart-1" | + And the sum of the fees is correct and the EC codes are: + | feeCode | + | "77777777777" | + Scenario: Commission is lower than the sum of the fees Given initial json """ diff --git a/integration-test/src/step_definitions/support/steps.js b/integration-test/src/step_definitions/support/steps.js index a262e499..84abd3b9 100644 --- a/integration-test/src/step_definitions/support/steps.js +++ b/integration-test/src/step_definitions/support/steps.js @@ -114,7 +114,7 @@ Then('the body response ordering for the bundleOptions.onUs field is:', function // true values first return (a.onUs === b.onUs)? 0 : a.onUs? -1 : 1; }); - for (let i=0; i b.creditorInstitution) ? 1 : ((b.creditorInstitution > a.creditorInstitution) ? -1 : 0); }); - for(let j=0; j Date: Fri, 8 Nov 2024 13:57:26 +0000 Subject: [PATCH 11/11] Bump to version 2.10.32-1-PAGOPA-2348 [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi-node-v1.json | 721 +++++++++-------- openapi/openapi-node-v2.json | 799 +++++++++--------- openapi/openapi-v1-dev-uat.json | 1333 ++++++++++++++++--------------- openapi/openapi-v1.json | 721 +++++++++-------- openapi/openapi-v2.json | 799 +++++++++--------- pom.xml | 2 +- 10 files changed, 2291 insertions(+), 2094 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 209644bc..6d6b7e5f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 2.45.0 -appVersion: 2.10.32 +version: 2.46.0 +appVersion: 2.10.32-1-PAGOPA-2348 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index c5eb511b..8cc05564 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-afm-calculator - tag: "2.10.32" + tag: "2.10.32-1-PAGOPA-2348" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index c45f8de9..3d152968 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-afm-calculator - tag: "2.10.32" + tag: "2.10.32-1-PAGOPA-2348" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index d1d7209f..3802c1fc 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-afm-calculator - tag: "2.10.32" + tag: "2.10.32-1-PAGOPA-2348" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi-node-v1.json b/openapi/openapi-node-v1.json index 1f1612c2..ce46b158 100644 --- a/openapi/openapi-node-v1.json +++ b/openapi/openapi-node-v1.json @@ -1,481 +1,510 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "PagoPA API Calculator Logic", - "description" : "Calculator Logic microservice for pagoPA AFM", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "2.10.32" + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Calculator Logic", + "description": "Calculator Logic microservice for pagoPA AFM", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "2.10.32-1-PAGOPA-2348" }, - "servers" : [ { - "url" : "http://localhost/", - "description" : "Generated server url" - } ], - "tags" : [ { - "name" : "Calculator", - "description" : "Everything about Calculator business logic" - } ], - "paths" : { - "/psps/{idPsp}/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of the specified idPSP", - "operationId" : "getFeesByPsp", - "parameters" : [ { - "name" : "idPsp", - "in" : "path", - "description" : "PSP identifier", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "servers": [ + { + "url": "http://localhost/", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Calculator", + "description": "Everything about Calculator business logic" + } + ], + "paths": { + "/psps/{idPsp}/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of the specified idPSP", + "operationId": "getFeesByPsp", + "parameters": [ + { + "name": "idPsp", + "in": "path", + "description": "PSP identifier", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionByPsp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionByPsp" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of all or specified idPSP", - "operationId" : "getFees", - "parameters" : [ { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of all or specified idPSP", + "operationId": "getFees", + "parameters": [ + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOption" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOption" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "429": { + "description": "Too many requests" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "403" : { - "description" : "Forbidden" + "403": { + "description": "Forbidden" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } } }, - "components" : { - "schemas" : { - "PaymentOptionByPsp" : { - "type" : "object", - "properties" : { - "idChannel" : { - "type" : "string" + "components": { + "schemas": { + "PaymentOptionByPsp": { + "type": "object", + "properties": { + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "paymentAmount" : { - "type" : "integer", - "format" : "int64" + "paymentAmount": { + "type": "integer", + "format": "int64" }, - "primaryCreditorInstitution" : { - "type" : "string" + "primaryCreditorInstitution": { + "type": "string" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "bin" : { - "type" : "string" + "bin": { + "type": "string" }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "TransferListItem" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" + "TransferListItem": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" }, - "transferCategory" : { - "type" : "string" + "transferCategory": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" } } }, - "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" + "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" } } }, - "BundleOption" : { - "type" : "object", - "properties" : { - "belowThreshold" : { - "type" : "boolean", - "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + "BundleOption": { + "type": "object", + "properties": { + "belowThreshold": { + "type": "boolean", + "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" } } } }, - "Transfer" : { - "type" : "object", - "properties" : { - "taxPayerFee" : { - "type" : "integer", - "format" : "int64" + "Transfer": { + "type": "object", + "properties": { + "taxPayerFee": { + "type": "integer", + "format": "int64" }, - "primaryCiIncurredFee" : { - "type" : "integer", - "format" : "int64" + "primaryCiIncurredFee": { + "type": "integer", + "format": "int64" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "idBundle" : { - "type" : "string" + "idBundle": { + "type": "string" }, - "bundleName" : { - "type" : "string" + "bundleName": { + "type": "string" }, - "bundleDescription" : { - "type" : "string" + "bundleDescription": { + "type": "string" }, - "idCiBundle" : { - "type" : "string" + "idCiBundle": { + "type": "string" }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" } } }, - "PaymentOption" : { - "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], - "type" : "object", - "properties" : { - "paymentAmount" : { - "type" : "integer", - "format" : "int64" - }, - "primaryCreditorInstitution" : { - "type" : "string" - }, - "bin" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idPspList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PspSearchCriteria" + "PaymentOption": { + "required": [ + "paymentAmount", + "primaryCreditorInstitution", + "transferList" + ], + "type": "object", + "properties": { + "paymentAmount": { + "type": "integer", + "format": "int64" + }, + "primaryCreditorInstitution": { + "type": "string" + }, + "bin": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idPspList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PspSearchCriteria" } }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria" : { - "required" : [ "idPsp" ], - "type" : "object", - "properties" : { - "idPsp" : { - "type" : "string" - }, - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" + "PspSearchCriteria": { + "required": [ + "idPsp" + ], + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" } } }, - "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" } } } }, - "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" } } } -} \ No newline at end of file +} diff --git a/openapi/openapi-node-v2.json b/openapi/openapi-node-v2.json index 6120d8ff..dfa4fa14 100644 --- a/openapi/openapi-node-v2.json +++ b/openapi/openapi-node-v2.json @@ -1,513 +1,548 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "PagoPA API Calculator Logic", - "description" : "Calculator Logic microservice for pagoPA AFM", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "2.10.32" + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Calculator Logic", + "description": "Calculator Logic microservice for pagoPA AFM", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "2.10.32-1-PAGOPA-2348" }, - "servers" : [ { - "url" : "http://localhost/", - "description" : "Generated server url" - } ], - "tags" : [ { - "name" : "Calculator", - "description" : "Everything about Calculator business logic" - } ], - "paths" : { - "/psps/{idPsp}/fees/multi" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId" : "getFeesByPspMulti", - "parameters" : [ { - "name" : "idPsp", - "in" : "path", - "description" : "PSP identifier", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "servers": [ + { + "url": "http://localhost/", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Calculator", + "description": "Everything about Calculator business logic" + } + ], + "paths": { + "/psps/{idPsp}/fees/multi": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId": "getFeesByPspMulti", + "parameters": [ + { + "name": "idPsp", + "in": "path", + "description": "PSP identifier", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionByPspMulti" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/fees/multi" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId" : "getFeesMulti", - "parameters" : [ { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "/fees/multi": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId": "getFeesMulti", + "parameters": [ + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionMulti" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionMulti" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "429": { + "description": "Too many requests" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "403" : { - "description" : "Forbidden" + "403": { + "description": "Forbidden" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } } }, - "components" : { - "schemas" : { - "PaymentNoticeItem" : { - "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], - "type" : "object", - "properties" : { - "paymentAmount" : { - "type" : "integer", - "format" : "int64" - }, - "primaryCreditorInstitution" : { - "type" : "string" - }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "components": { + "schemas": { + "PaymentNoticeItem": { + "required": [ + "paymentAmount", + "primaryCreditorInstitution", + "transferList" + ], + "type": "object", + "properties": { + "paymentAmount": { + "type": "integer", + "format": "int64" + }, + "primaryCreditorInstitution": { + "type": "string" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti" : { - "required" : [ "paymentNotice" ], - "type" : "object", - "properties" : { - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "bin" : { - "type" : "string" - }, - "paymentNotice" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti": { + "required": [ + "paymentNotice" + ], + "type": "object", + "properties": { + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "bin": { + "type": "string" + }, + "paymentNotice": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" + "TransferListItem": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" }, - "transferCategory" : { - "type" : "string" + "transferCategory": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" } } }, - "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" + "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" } } }, - "BundleOption" : { - "type" : "object", - "properties" : { - "belowThreshold" : { - "type" : "boolean", - "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + "BundleOption": { + "type": "object", + "properties": { + "belowThreshold": { + "type": "boolean", + "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" } } } }, - "Fee" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" - }, - "primaryCiIncurredFee" : { - "type" : "integer", - "format" : "int64" - }, - "actualCiIncurredFee" : { - "type" : "integer", - "format" : "int64" + "Fee": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "integer", + "format": "int64" + }, + "actualCiIncurredFee": { + "type": "integer", + "format": "int64" } } }, - "Transfer" : { - "required" : [ "fees" ], - "type" : "object", - "properties" : { - "taxPayerFee" : { - "type" : "integer", - "format" : "int64" - }, - "actualPayerFee" : { - "type" : "integer", - "format" : "int64" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idBundle" : { - "type" : "string" - }, - "bundleName" : { - "type" : "string" - }, - "bundleDescription" : { - "type" : "string" - }, - "idsCiBundle" : { - "type" : "array", - "items" : { - "type" : "string" + "Transfer": { + "required": [ + "fees" + ], + "type": "object", + "properties": { + "taxPayerFee": { + "type": "integer", + "format": "int64" + }, + "actualPayerFee": { + "type": "integer", + "format": "int64" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "bundleName": { + "type": "string" + }, + "bundleDescription": { + "type": "string" + }, + "idsCiBundle": { + "type": "array", + "items": { + "type": "string" } }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" }, - "fees" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Fee" + "fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" } } } }, - "PaymentOptionMulti" : { - "required" : [ "paymentNotice" ], - "type" : "object", - "properties" : { - "bin" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idPspList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti": { + "required": [ + "paymentNotice" + ], + "type": "object", + "properties": { + "bin": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idPspList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNoticeItem" + "paymentNotice": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria" : { - "required" : [ "idPsp" ], - "type" : "object", - "properties" : { - "idPsp" : { - "type" : "string" - }, - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" + "PspSearchCriteria": { + "required": [ + "idPsp" + ], + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" } } }, - "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" } } } }, - "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" } } } -} \ No newline at end of file +} diff --git a/openapi/openapi-v1-dev-uat.json b/openapi/openapi-v1-dev-uat.json index 06c33c77..92d22176 100644 --- a/openapi/openapi-v1-dev-uat.json +++ b/openapi/openapi-v1-dev-uat.json @@ -1,466 +1,505 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "PagoPA API Calculator Logic", - "description" : "Calculator Logic microservice for pagoPA AFM", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "2.10.32" + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Calculator Logic", + "description": "Calculator Logic microservice for pagoPA AFM", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "2.10.32-1-PAGOPA-2348" }, - "servers" : [ { - "url" : "http://localhost/", - "description" : "Generated server url" - } ], - "tags" : [ { - "name" : "Calculator", - "description" : "Everything about Calculator business logic" - }, { - "name" : "Configuration", - "description" : "Utility Services" - }, { - "name" : "Actuator", - "description" : "Monitor and interact", - "externalDocs" : { - "description" : "Spring Boot Actuator Web API Documentation", - "url" : "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + "servers": [ + { + "url": "http://localhost/", + "description": "Generated server url" } - } ], - "paths" : { - "/psps/{idPsp}/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of the specified idPSP", - "operationId" : "getFeesByPsp", - "parameters" : [ { - "name" : "idPsp", - "in" : "path", - "description" : "PSP identifier", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionByPsp" + ], + "tags": [ + { + "name": "Calculator", + "description": "Everything about Calculator business logic" + }, + { + "name": "Configuration", + "description": "Utility Services" + }, + { + "name": "Actuator", + "description": "Monitor and interact", + "externalDocs": { + "description": "Spring Boot Actuator Web API Documentation", + "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + } + } + ], + "paths": { + "/psps/{idPsp}/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of the specified idPSP", + "operationId": "getFeesByPsp", + "parameters": [ + { + "name": "idPsp", + "in": "path", + "description": "PSP identifier", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionByPsp" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of all or specified idPSP", - "operationId" : "getFees", - "parameters" : [ { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOption" + "/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of all or specified idPSP", + "operationId": "getFees", + "parameters": [ + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOption" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/configuration/touchpoint/delete" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "deleteTouchpoints", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Touchpoint" + "/configuration/touchpoint/delete": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "deleteTouchpoints", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Touchpoint" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/configuration/touchpoint/add" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "addTouchpoints", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Touchpoint" + "/configuration/touchpoint/add": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "addTouchpoints", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Touchpoint" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/configuration/paymenttypes/delete" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "deletePaymentTypes", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentType" + "/configuration/paymenttypes/delete": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "deletePaymentTypes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentType" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/configuration/paymenttypes/add" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "addPaymentTypes", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentType" + "/configuration/paymenttypes/add": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "addPaymentTypes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentType" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/configuration/bundles/delete" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "deleteValidBundles", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ValidBundle" + "/configuration/bundles/delete": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "deleteValidBundles", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidBundle" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/configuration/bundles/add" : { - "post" : { - "tags" : [ "Configuration" ], - "operationId" : "addValidBundles", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ValidBundle" + "/configuration/bundles/add": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "addValidBundles", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidBundle" } } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK" + "responses": { + "200": { + "description": "OK" } } } }, - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "429": { + "description": "Too many requests" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "403" : { - "description" : "Forbidden" + "403": { + "description": "Forbidden" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/actuator" : { - "get" : { - "tags" : [ "Actuator" ], - "summary" : "Actuator root web endpoint", - "operationId" : "links", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" + "/actuator": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator root web endpoint", + "operationId": "links", + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } } } }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } } } }, - "application/json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } } } @@ -470,28 +509,30 @@ } } }, - "/actuator/info" : { - "get" : { - "tags" : [ "Actuator" ], - "summary" : "Actuator web endpoint 'info'", - "operationId" : "info", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" + "/actuator/info": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'info'", + "operationId": "info", + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } }, - "application/json" : { - "schema" : { - "type" : "object" + "application/json": { + "schema": { + "type": "object" } } } @@ -499,28 +540,30 @@ } } }, - "/actuator/health" : { - "get" : { - "tags" : [ "Actuator" ], - "summary" : "Actuator web endpoint 'health'", - "operationId" : "health", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" + "/actuator/health": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health'", + "operationId": "health", + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } }, - "application/json" : { - "schema" : { - "type" : "object" + "application/json": { + "schema": { + "type": "object" } } } @@ -528,28 +571,30 @@ } } }, - "/actuator/health/**" : { - "get" : { - "tags" : [ "Actuator" ], - "summary" : "Actuator web endpoint 'health-path'", - "operationId" : "health-path", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" + "/actuator/health/**": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health-path'", + "operationId": "health-path", + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } }, - "application/json" : { - "schema" : { - "type" : "object" + "application/json": { + "schema": { + "type": "object" } } } @@ -558,365 +603,389 @@ } } }, - "components" : { - "schemas" : { - "PaymentOptionByPsp" : { - "type" : "object", - "properties" : { - "idChannel" : { - "type" : "string" + "components": { + "schemas": { + "PaymentOptionByPsp": { + "type": "object", + "properties": { + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "paymentAmount" : { - "type" : "integer", - "format" : "int64" + "paymentAmount": { + "type": "integer", + "format": "int64" }, - "primaryCreditorInstitution" : { - "type" : "string" + "primaryCreditorInstitution": { + "type": "string" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "bin" : { - "type" : "string" + "bin": { + "type": "string" }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "TransferListItem" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" + "TransferListItem": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" }, - "transferCategory" : { - "type" : "string" + "transferCategory": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" } } }, - "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" + "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" } } }, - "BundleOption" : { - "type" : "object", - "properties" : { - "belowThreshold" : { - "type" : "boolean", - "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + "BundleOption": { + "type": "object", + "properties": { + "belowThreshold": { + "type": "boolean", + "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" }, - "bundleOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + "bundleOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" } } } }, - "Transfer" : { - "type" : "object", - "properties" : { - "taxPayerFee" : { - "type" : "integer", - "format" : "int64" + "Transfer": { + "type": "object", + "properties": { + "taxPayerFee": { + "type": "integer", + "format": "int64" }, - "primaryCiIncurredFee" : { - "type" : "integer", - "format" : "int64" + "primaryCiIncurredFee": { + "type": "integer", + "format": "int64" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "idBundle" : { - "type" : "string" + "idBundle": { + "type": "string" }, - "bundleName" : { - "type" : "string" + "bundleName": { + "type": "string" }, - "bundleDescription" : { - "type" : "string" + "bundleDescription": { + "type": "string" }, - "idCiBundle" : { - "type" : "string" + "idCiBundle": { + "type": "string" }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" } } }, - "PaymentOption" : { - "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], - "type" : "object", - "properties" : { - "paymentAmount" : { - "type" : "integer", - "format" : "int64" + "PaymentOption": { + "required": [ + "paymentAmount", + "primaryCreditorInstitution", + "transferList" + ], + "type": "object", + "properties": { + "paymentAmount": { + "type": "integer", + "format": "int64" }, - "primaryCreditorInstitution" : { - "type" : "string" + "primaryCreditorInstitution": { + "type": "string" }, - "bin" : { - "type" : "string" + "bin": { + "type": "string" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "idPspList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PspSearchCriteria" + "idPspList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PspSearchCriteria" } }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria" : { - "required" : [ "idPsp" ], - "type" : "object", - "properties" : { - "idPsp" : { - "type" : "string" + "PspSearchCriteria": { + "required": [ + "idPsp" + ], + "type": "object", + "properties": { + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" } } }, - "Touchpoint" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" + "Touchpoint": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "name" : { - "type" : "string" + "name": { + "type": "string" }, - "creationDate" : { - "type" : "string", - "format" : "date-time" + "creationDate": { + "type": "string", + "format": "date-time" } } }, - "PaymentType" : { - "required" : [ "id", "name" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "createdDate" : { - "type" : "string", - "format" : "date-time" + "PaymentType": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdDate": { + "type": "string", + "format": "date-time" } } }, - "CiBundle" : { - "required" : [ "ciFiscalCode", "id" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string" + "CiBundle": { + "required": [ + "ciFiscalCode", + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" }, - "ciFiscalCode" : { - "type" : "string" + "ciFiscalCode": { + "type": "string" }, - "attributes" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CiBundleAttribute" + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CiBundleAttribute" } } } }, - "CiBundleAttribute" : { - "required" : [ "id" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - }, - "maxPaymentAmount" : { - "type" : "integer", - "format" : "int64" - }, - "transferCategory" : { - "type" : "string" - }, - "transferCategoryRelation" : { - "type" : "string", - "enum" : [ "EQUAL", "NOT_EQUAL" ] + "CiBundleAttribute": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "maxPaymentAmount": { + "type": "integer", + "format": "int64" + }, + "transferCategory": { + "type": "string" + }, + "transferCategoryRelation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL" + ] } } }, - "ValidBundle" : { - "required" : [ "digitalStamp", "digitalStampRestriction" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string" + "ValidBundle": { + "required": [ + "digitalStamp", + "digitalStampRestriction" + ], + "type": "object", + "properties": { + "id": { + "type": "string" }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" }, - "name" : { - "type" : "string" + "name": { + "type": "string" }, - "description" : { - "type" : "string" + "description": { + "type": "string" }, - "paymentAmount" : { - "type" : "integer", - "format" : "int64" + "paymentAmount": { + "type": "integer", + "format": "int64" }, - "minPaymentAmount" : { - "type" : "integer", - "format" : "int64" + "minPaymentAmount": { + "type": "integer", + "format": "int64" }, - "maxPaymentAmount" : { - "type" : "integer", - "format" : "int64" + "maxPaymentAmount": { + "type": "integer", + "format": "int64" }, - "paymentType" : { - "type" : "string" + "paymentType": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "type" : { - "type" : "string", - "enum" : [ "GLOBAL", "PUBLIC", "PRIVATE" ] + "type": { + "type": "string", + "enum": [ + "GLOBAL", + "PUBLIC", + "PRIVATE" + ] }, - "transferCategoryList" : { - "type" : "array", - "items" : { - "type" : "string" + "transferCategoryList": { + "type": "array", + "items": { + "type": "string" } }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" }, - "digitalStampRestriction" : { - "type" : "boolean" + "digitalStampRestriction": { + "type": "boolean" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "ciBundleList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CiBundle" + "ciBundleList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CiBundle" } } } }, - "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" } } }, - "Link" : { - "type" : "object", - "properties" : { - "href" : { - "type" : "string" + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" }, - "templated" : { - "type" : "boolean" + "templated": { + "type": "boolean" } } } }, - "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" } } } -} \ No newline at end of file +} diff --git a/openapi/openapi-v1.json b/openapi/openapi-v1.json index 1f1612c2..ce46b158 100644 --- a/openapi/openapi-v1.json +++ b/openapi/openapi-v1.json @@ -1,481 +1,510 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "PagoPA API Calculator Logic", - "description" : "Calculator Logic microservice for pagoPA AFM", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "2.10.32" + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Calculator Logic", + "description": "Calculator Logic microservice for pagoPA AFM", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "2.10.32-1-PAGOPA-2348" }, - "servers" : [ { - "url" : "http://localhost/", - "description" : "Generated server url" - } ], - "tags" : [ { - "name" : "Calculator", - "description" : "Everything about Calculator business logic" - } ], - "paths" : { - "/psps/{idPsp}/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of the specified idPSP", - "operationId" : "getFeesByPsp", - "parameters" : [ { - "name" : "idPsp", - "in" : "path", - "description" : "PSP identifier", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "servers": [ + { + "url": "http://localhost/", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Calculator", + "description": "Everything about Calculator business logic" + } + ], + "paths": { + "/psps/{idPsp}/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of the specified idPSP", + "operationId": "getFeesByPsp", + "parameters": [ + { + "name": "idPsp", + "in": "path", + "description": "PSP identifier", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionByPsp" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionByPsp" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/fees" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of all or specified idPSP", - "operationId" : "getFees", - "parameters" : [ { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "/fees": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of all or specified idPSP", + "operationId": "getFees", + "parameters": [ + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOption" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOption" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "429": { + "description": "Too many requests" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "403" : { - "description" : "Forbidden" + "403": { + "description": "Forbidden" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } } }, - "components" : { - "schemas" : { - "PaymentOptionByPsp" : { - "type" : "object", - "properties" : { - "idChannel" : { - "type" : "string" + "components": { + "schemas": { + "PaymentOptionByPsp": { + "type": "object", + "properties": { + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "paymentAmount" : { - "type" : "integer", - "format" : "int64" + "paymentAmount": { + "type": "integer", + "format": "int64" }, - "primaryCreditorInstitution" : { - "type" : "string" + "primaryCreditorInstitution": { + "type": "string" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "bin" : { - "type" : "string" + "bin": { + "type": "string" }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "TransferListItem" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" + "TransferListItem": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" }, - "transferCategory" : { - "type" : "string" + "transferCategory": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" } } }, - "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" + "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" } } }, - "BundleOption" : { - "type" : "object", - "properties" : { - "belowThreshold" : { - "type" : "boolean", - "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + "BundleOption": { + "type": "object", + "properties": { + "belowThreshold": { + "type": "boolean", + "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" } } } }, - "Transfer" : { - "type" : "object", - "properties" : { - "taxPayerFee" : { - "type" : "integer", - "format" : "int64" + "Transfer": { + "type": "object", + "properties": { + "taxPayerFee": { + "type": "integer", + "format": "int64" }, - "primaryCiIncurredFee" : { - "type" : "integer", - "format" : "int64" + "primaryCiIncurredFee": { + "type": "integer", + "format": "int64" }, - "paymentMethod" : { - "type" : "string" + "paymentMethod": { + "type": "string" }, - "touchpoint" : { - "type" : "string" + "touchpoint": { + "type": "string" }, - "idBundle" : { - "type" : "string" + "idBundle": { + "type": "string" }, - "bundleName" : { - "type" : "string" + "bundleName": { + "type": "string" }, - "bundleDescription" : { - "type" : "string" + "bundleDescription": { + "type": "string" }, - "idCiBundle" : { - "type" : "string" + "idCiBundle": { + "type": "string" }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" } } }, - "PaymentOption" : { - "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], - "type" : "object", - "properties" : { - "paymentAmount" : { - "type" : "integer", - "format" : "int64" - }, - "primaryCreditorInstitution" : { - "type" : "string" - }, - "bin" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idPspList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PspSearchCriteria" + "PaymentOption": { + "required": [ + "paymentAmount", + "primaryCreditorInstitution", + "transferList" + ], + "type": "object", + "properties": { + "paymentAmount": { + "type": "integer", + "format": "int64" + }, + "primaryCreditorInstitution": { + "type": "string" + }, + "bin": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idPspList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PspSearchCriteria" } }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria" : { - "required" : [ "idPsp" ], - "type" : "object", - "properties" : { - "idPsp" : { - "type" : "string" - }, - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" + "PspSearchCriteria": { + "required": [ + "idPsp" + ], + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" } } }, - "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" } } } }, - "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" } } } -} \ No newline at end of file +} diff --git a/openapi/openapi-v2.json b/openapi/openapi-v2.json index 6120d8ff..dfa4fa14 100644 --- a/openapi/openapi-v2.json +++ b/openapi/openapi-v2.json @@ -1,513 +1,548 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "PagoPA API Calculator Logic", - "description" : "Calculator Logic microservice for pagoPA AFM", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "2.10.32" + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Calculator Logic", + "description": "Calculator Logic microservice for pagoPA AFM", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "2.10.32-1-PAGOPA-2348" }, - "servers" : [ { - "url" : "http://localhost/", - "description" : "Generated server url" - } ], - "tags" : [ { - "name" : "Calculator", - "description" : "Everything about Calculator business logic" - } ], - "paths" : { - "/psps/{idPsp}/fees/multi" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId" : "getFeesByPspMulti", - "parameters" : [ { - "name" : "idPsp", - "in" : "path", - "description" : "PSP identifier", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "servers": [ + { + "url": "http://localhost/", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Calculator", + "description": "Everything about Calculator business logic" + } + ], + "paths": { + "/psps/{idPsp}/fees/multi": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId": "getFeesByPspMulti", + "parameters": [ + { + "name": "idPsp", + "in": "path", + "description": "PSP identifier", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionByPspMulti" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/fees/multi" : { - "post" : { - "tags" : [ "Calculator" ], - "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId" : "getFeesMulti", - "parameters" : [ { - "name" : "maxOccurrences", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer", - "format" : "int32", - "default" : 10 - } - }, { - "name" : "allCcp", - "in" : "query", - "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required" : false, - "schema" : { - "type" : "string", - "default" : "true" + "/fees/multi": { + "post": { + "tags": [ + "Calculator" + ], + "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId": "getFeesMulti", + "parameters": [ + { + "name": "maxOccurrences", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "allCcp", + "in": "query", + "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required": false, + "schema": { + "type": "string", + "default": "true" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentOptionMulti" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentOptionMulti" } } }, - "required" : true + "required": true }, - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "422" : { - "description" : "Unable to process the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "429": { + "description": "Too many requests" + }, + "422": { + "description": "Unable to process the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BundleOption" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BundleOption" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not Found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } }, - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "429" : { - "description" : "Too many requests" - }, - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "429": { + "description": "Too many requests" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } }, - "500" : { - "description" : "Service unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "500": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized" + "401": { + "description": "Unauthorized" }, - "403" : { - "description" : "Forbidden" + "403": { + "description": "Forbidden" }, - "400" : { - "description" : "Bad Request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } } }, - "components" : { - "schemas" : { - "PaymentNoticeItem" : { - "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], - "type" : "object", - "properties" : { - "paymentAmount" : { - "type" : "integer", - "format" : "int64" - }, - "primaryCreditorInstitution" : { - "type" : "string" - }, - "transferList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferListItem" + "components": { + "schemas": { + "PaymentNoticeItem": { + "required": [ + "paymentAmount", + "primaryCreditorInstitution", + "transferList" + ], + "type": "object", + "properties": { + "paymentAmount": { + "type": "integer", + "format": "int64" + }, + "primaryCreditorInstitution": { + "type": "string" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti" : { - "required" : [ "paymentNotice" ], - "type" : "object", - "properties" : { - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "bin" : { - "type" : "string" - }, - "paymentNotice" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti": { + "required": [ + "paymentNotice" + ], + "type": "object", + "properties": { + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "bin": { + "type": "string" + }, + "paymentNotice": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" + "TransferListItem": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" }, - "transferCategory" : { - "type" : "string" + "transferCategory": { + "type": "string" }, - "digitalStamp" : { - "type" : "boolean" + "digitalStamp": { + "type": "boolean" } } }, - "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" + "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" } } }, - "BundleOption" : { - "type" : "object", - "properties" : { - "belowThreshold" : { - "type" : "boolean", - "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + "BundleOption": { + "type": "object", + "properties": { + "belowThreshold": { + "type": "boolean", + "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" } } } }, - "Fee" : { - "type" : "object", - "properties" : { - "creditorInstitution" : { - "type" : "string" - }, - "primaryCiIncurredFee" : { - "type" : "integer", - "format" : "int64" - }, - "actualCiIncurredFee" : { - "type" : "integer", - "format" : "int64" + "Fee": { + "type": "object", + "properties": { + "creditorInstitution": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "integer", + "format": "int64" + }, + "actualCiIncurredFee": { + "type": "integer", + "format": "int64" } } }, - "Transfer" : { - "required" : [ "fees" ], - "type" : "object", - "properties" : { - "taxPayerFee" : { - "type" : "integer", - "format" : "int64" - }, - "actualPayerFee" : { - "type" : "integer", - "format" : "int64" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idBundle" : { - "type" : "string" - }, - "bundleName" : { - "type" : "string" - }, - "bundleDescription" : { - "type" : "string" - }, - "idsCiBundle" : { - "type" : "array", - "items" : { - "type" : "string" + "Transfer": { + "required": [ + "fees" + ], + "type": "object", + "properties": { + "taxPayerFee": { + "type": "integer", + "format": "int64" + }, + "actualPayerFee": { + "type": "integer", + "format": "int64" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "bundleName": { + "type": "string" + }, + "bundleDescription": { + "type": "string" + }, + "idsCiBundle": { + "type": "array", + "items": { + "type": "string" } }, - "idPsp" : { - "type" : "string" + "idPsp": { + "type": "string" }, - "idChannel" : { - "type" : "string" + "idChannel": { + "type": "string" }, - "idBrokerPsp" : { - "type" : "string" + "idBrokerPsp": { + "type": "string" }, - "onUs" : { - "type" : "boolean" + "onUs": { + "type": "boolean" }, - "abi" : { - "type" : "string" + "abi": { + "type": "string" }, - "pspBusinessName" : { - "type" : "string" + "pspBusinessName": { + "type": "string" }, - "fees" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Fee" + "fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" } } } }, - "PaymentOptionMulti" : { - "required" : [ "paymentNotice" ], - "type" : "object", - "properties" : { - "bin" : { - "type" : "string" - }, - "paymentMethod" : { - "type" : "string" - }, - "touchpoint" : { - "type" : "string" - }, - "idPspList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti": { + "required": [ + "paymentNotice" + ], + "type": "object", + "properties": { + "bin": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "idPspList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNoticeItem" + "paymentNotice": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria" : { - "required" : [ "idPsp" ], - "type" : "object", - "properties" : { - "idPsp" : { - "type" : "string" - }, - "idChannel" : { - "type" : "string" - }, - "idBrokerPsp" : { - "type" : "string" + "PspSearchCriteria": { + "required": [ + "idPsp" + ], + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" } } }, - "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" } } } }, - "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" } } } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index e7781496..aa3a7f3f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ it.gov.pagopa calculator - 2.10.32 + 2.10.32-1-PAGOPA-2348 afm-calculator Calculator Logic microservice for pagoPA AFM