From 07cf8860e99e038bae7894504840e466e21977e0 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Tue, 17 Dec 2024 10:59:31 +0000 Subject: [PATCH 01/28] Bump to version 1.1.0 [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 711 ++++++++++++++++++++++-------------------- pom.xml | 2 +- 6 files changed, 381 insertions(+), 342 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index f52ced7..a9da8df 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-mbd-service description: Microservice that handles services for eBollo type: application -version: 0.97.0 -appVersion: 1.0.1-4-fix-dati-servizio +version: 0.98.0 +appVersion: 1.1.0 dependencies: - name: microservice-chart version: 7.1.1 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 2dfab1b..a269319 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.0.1-4-fix-dati-servizio" + tag: "1.1.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 1ff14fb..e04af7a 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.0.1-4-fix-dati-servizio" + tag: "1.1.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 34ea937..3154463 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.0.1-4-fix-dati-servizio" + tag: "1.1.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/openapi/openapi.json b/openapi/openapi.json index 9c7a5f3..cea09af 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,493 +1,532 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "mbd-service", - "description" : "@project.description@", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "1.0.1-4-fix-dati-servizio" + "openapi": "3.0.1", + "info": { + "title": "mbd-service", + "description": "@project.description@", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "1.1.0" }, - "servers" : [ { - "url" : "", - "description" : "Generated server url" - } ], - "paths" : { - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "servers": [ + { + "url": "", + "description": "Generated server url" + } + ], + "paths": { + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] }, - "/organizations/{fiscalCodeEC}/mbd" : { - "post" : { - "tags" : [ "mbd-controller" ], - "summary" : "getMbd", - "description" : "Return mbd data for payment on requirement ", - "operationId" : "getMdb", - "parameters" : [ { - "name" : "fiscalCodeEC", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/organizations/{fiscalCodeEC}/mbd": { + "post": { + "tags": [ + "mbd-controller" + ], + "summary": "getMbd", + "description": "Return mbd data for payment on requirement ", + "operationId": "getMdb", + "parameters": [ + { + "name": "fiscalCodeEC", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetMbdRequest" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMbdRequest" } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetCartResponse" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCartResponse" } } } }, - "400" : { - "description" : "Bad Request", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Forbidden", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "ibans for the brokerCode not found", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "404": { + "description": "ibans for the brokerCode not found", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "429" : { - "description" : "Too many requests", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "500" : { - "description" : "Service unavailable", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetCartErrorResponse" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCartErrorResponse" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] }, - "/organizations/{fiscalCode}/receipt/{nav}" : { - "get" : { - "tags" : [ "mbd-controller" ], - "summary" : "getPaymentReceipt", - "description" : "Return receipt of payment on requirement ", - "operationId" : "getPaymentReceipts", - "parameters" : [ { - "name" : "fiscalCode", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "nav", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/organizations/{fiscalCode}/receipt/{nav}": { + "get": { + "tags": [ + "mbd-controller" + ], + "summary": "getPaymentReceipt", + "description": "Return receipt of payment on requirement ", + "operationId": "getPaymentReceipts", + "parameters": [ + { + "name": "fiscalCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nav", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetMdbReceipt" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMdbReceipt" } } } }, - "400" : { - "description" : "Bad Request", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "403" : { - "description" : "Forbidden", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "ibans for the brokerCode not found", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "404": { + "description": "ibans for the brokerCode not found", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "429" : { - "description" : "Too many requests", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "500" : { - "description" : "Service unavailable", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] } }, - "components" : { - "schemas" : { - "GetMbdRequest" : { - "required" : [ "idCIService", "returnUrls" ], - "type" : "object", - "properties" : { - "paymentNotices" : { - "maxItems" : 1, - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNotice" + "components": { + "schemas": { + "GetMbdRequest": { + "required": [ + "idCIService", + "returnUrls" + ], + "type": "object", + "properties": { + "paymentNotices": { + "maxItems": 1, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNotice" } }, - "idCIService" : { - "type" : "string" + "idCIService": { + "type": "string" }, - "returnUrls" : { - "$ref" : "#/components/schemas/ReturnUrls" + "returnUrls": { + "$ref": "#/components/schemas/ReturnUrls" } } }, - "PaymentNotice" : { - "required" : [ "amount", "email", "firstName", "fiscalCode", "lastName", "province" ], - "type" : "object", - "properties" : { - "firstName" : { - "type" : "string" + "PaymentNotice": { + "required": [ + "amount", + "email", + "firstName", + "fiscalCode", + "lastName", + "province" + ], + "type": "object", + "properties": { + "firstName": { + "type": "string" }, - "lastName" : { - "type" : "string" + "lastName": { + "type": "string" }, - "fiscalCode" : { - "type" : "string" + "fiscalCode": { + "type": "string" }, - "email" : { - "type" : "string" + "email": { + "type": "string" }, - "amount" : { - "type" : "integer", - "format" : "int64" + "amount": { + "type": "integer", + "format": "int64" }, - "province" : { - "type" : "string" + "province": { + "type": "string" }, - "documentHash" : { - "maxLength" : 44, - "minLength" : 44, - "type" : "string" + "documentHash": { + "maxLength": 44, + "minLength": 44, + "type": "string" } } }, - "ReturnUrls" : { - "required" : [ "cancelUrl", "errorUrl", "successUrl" ], - "type" : "object", - "properties" : { - "successUrl" : { - "type" : "string" + "ReturnUrls": { + "required": [ + "cancelUrl", + "errorUrl", + "successUrl" + ], + "type": "object", + "properties": { + "successUrl": { + "type": "string" }, - "cancelUrl" : { - "type" : "string" + "cancelUrl": { + "type": "string" }, - "errorUrl" : { - "type" : "string" + "errorUrl": { + "type": "string" } } }, - "ProblemJson" : { - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + "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 + "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" + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" } } }, - "GetCartResponse" : { - "type" : "object", - "properties" : { - "checkoutRedirectUrl" : { - "type" : "string" + "GetCartResponse": { + "type": "object", + "properties": { + "checkoutRedirectUrl": { + "type": "string" }, - "navDownloadLink" : { - "type" : "string" + "navDownloadLink": { + "type": "string" }, - "mbdNav" : { - "type" : "string" + "mbdNav": { + "type": "string" } } }, - "GetCartErrorResponse" : { - "type" : "object", - "properties" : { - "errorUrl" : { - "type" : "string" + "GetCartErrorResponse": { + "type": "object", + "properties": { + "errorUrl": { + "type": "string" } } }, - "GetMdbReceipt" : { - "type" : "object", - "properties" : { - "content" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" + "GetMdbReceipt": { + "type": "object", + "properties": { + "content": { + "type": "array", + "items": { + "type": "string", + "format": "byte" } } } }, - "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 808d50d..76219ab 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.ebollo mbd-service - 1.0.1-4-fix-dati-servizio + 1.1.0 MBD Service MBD Service From 3a86bdec5e0d7d234b93509d4619281eeb5ac74e Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Tue, 17 Dec 2024 11:05:23 +0000 Subject: [PATCH 02/28] Bump to version 1.2.0 [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index a9da8df..6e02f26 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-mbd-service description: Microservice that handles services for eBollo type: application -version: 0.98.0 -appVersion: 1.1.0 +version: 0.99.0 +appVersion: 1.2.0 dependencies: - name: microservice-chart version: 7.1.1 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index a269319..0cc9c26 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.1.0" + tag: "1.2.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index e04af7a..ac2b293 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.1.0" + tag: "1.2.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3154463..775f8e2 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.1.0" + tag: "1.2.0" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/openapi/openapi.json b/openapi/openapi.json index cea09af..f78e45b 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "mbd-service", "description": "@project.description@", "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.1.0" + "version": "1.2.0" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 76219ab..d6db871 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.ebollo mbd-service - 1.1.0 + 1.2.0 MBD Service MBD Service From 791f205c914645a5e5d456ad728634a612e3263d Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Tue, 17 Dec 2024 17:11:35 +0100 Subject: [PATCH 03/28] fix: UAT channel config --- helm/values-uat.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 775f8e2..96f09cd 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -79,7 +79,7 @@ microservice-chart: MBD_BASE_URL: 'https://api.dev.platform.pagopa.it/pagopa-mbd-service/v1' MBD_ID_PSP: 'ABI50004' MBD_ID_BROKER_PSP: '99999000011' - MBD_CHANNEL_ID: '99999000011_03' + MBD_CHANNEL_ID: '99999000011_02' ENV: 'azure-uat' CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}' OTEL_SERVICE_NAME: "pagopa-mbd-service" From 1ae155e0d08b63495f1f79f7f18d48bb93c833f0 Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Tue, 17 Dec 2024 17:16:00 +0100 Subject: [PATCH 04/28] fix: UAT channel config --- helm/values-uat.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 96f09cd..28442c7 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -76,7 +76,7 @@ microservice-chart: DEMAND_PAYMENT_ENDPOINT: 'https://api.uat.platform.pagopa.it/nodo-auth/node-for-psp/v1' CART_ENDPOINT: 'https://api.uat.platform.pagopa.it/checkout/carts-auth/v1/carts' PAYMENT_RECEIPT_ENDPOINT: 'https://api.uat.platform.pagopa.it/gpd/payments-receipts-service/v1' - MBD_BASE_URL: 'https://api.dev.platform.pagopa.it/pagopa-mbd-service/v1' + MBD_BASE_URL: 'https://api.uat.platform.pagopa.it/pagopa-mbd-service/v1' MBD_ID_PSP: 'ABI50004' MBD_ID_BROKER_PSP: '99999000011' MBD_CHANNEL_ID: '99999000011_02' From 1d5bd68aa47baaa6670605259488cb3fc9a351f5 Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Wed, 18 Dec 2024 12:52:20 +0100 Subject: [PATCH 05/28] fix: get receipt model --- openapi/openapi.json | 711 +++++++-------- pom.xml | 4 +- .../mbd/service/client/ReactiveClient.java | 31 +- .../mbd/service/controller/MbdController.java | 4 +- .../mbd/service/exception/ErrorHandler.java | 20 +- .../pafornode/CtEntityUniqueIdentifier.java | 95 ++ .../model/xml/node/pafornode/CtReceiptV2.java | 825 ++++++++++++++++++ .../model/xml/node/pafornode/CtSubject.java | 287 ++++++ .../pafornode/CtTransferListPAReceiptV2.java | 85 ++ .../node/pafornode/CtTransferPAReceiptV2.java | 2 +- .../xml/node/pafornode/ObjectFactory.java | 42 +- .../xml/node/pafornode/PaSendRTV2Request.java | 161 ++++ .../StEntityUniqueIdentifierType.java | 45 + .../xml/node/pafornode/package-info.java | 9 + .../service/service/impl/MbdServiceImpl.java | 11 +- src/main/resources/nodo-for-pa.xsd | 84 ++ .../service/client/ReactiveClientTest.java | 61 +- .../service/impl/MdbServiceImplTest.java | 19 +- 18 files changed, 2093 insertions(+), 403 deletions(-) create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java create mode 100644 src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java diff --git a/openapi/openapi.json b/openapi/openapi.json index f78e45b..d321e4f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,532 +1,493 @@ { - "openapi": "3.0.1", - "info": { - "title": "mbd-service", - "description": "@project.description@", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.2.0" + "openapi" : "3.0.1", + "info" : { + "title" : "mbd-service", + "description" : "MBD Service", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "1.2.0" }, - "servers": [ - { - "url": "", - "description": "Generated server url" - } - ], - "paths": { - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "servers" : [ { + "url" : "", + "description" : "Generated server url" + } ], + "paths" : { + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/organizations/{fiscalCodeEC}/mbd": { - "post": { - "tags": [ - "mbd-controller" - ], - "summary": "getMbd", - "description": "Return mbd data for payment on requirement ", - "operationId": "getMdb", - "parameters": [ - { - "name": "fiscalCodeEC", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "/organizations/{fiscalCodeEC}/mbd" : { + "post" : { + "tags" : [ "mbd-controller" ], + "summary" : "getMbd", + "description" : "Return mbd data for payment on requirement ", + "operationId" : "getMdb", + "parameters" : [ { + "name" : "fiscalCodeEC", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMbdRequest" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetMbdRequest" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetCartResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetCartResponse" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "400" : { + "description" : "Bad Request", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "ibans for the brokerCode not found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "ibans for the brokerCode not found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetCartErrorResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetCartErrorResponse" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] }, - "/organizations/{fiscalCode}/receipt/{nav}": { - "get": { - "tags": [ - "mbd-controller" - ], - "summary": "getPaymentReceipt", - "description": "Return receipt of payment on requirement ", - "operationId": "getPaymentReceipts", - "parameters": [ - { - "name": "fiscalCode", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "nav", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "/organizations/{fiscalCode}/receipt/{nav}" : { + "get" : { + "tags" : [ "mbd-controller" ], + "summary" : "getPaymentReceipt", + "description" : "Return receipt of payment on requirement ", + "operationId" : "getPaymentReceipts", + "parameters" : [ { + "name" : "fiscalCode", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "nav", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMdbReceipt" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetMdbReceipt" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "400" : { + "description" : "Bad Request", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/xml": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "404": { - "description": "ibans for the brokerCode not found", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "ibans for the brokerCode not found", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "429" : { + "description" : "Too many requests", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "parameters" : [ { + "name" : "X-Request-Id", + "in" : "header", + "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema" : { + "type" : "string" } - ] + } ] } }, - "components": { - "schemas": { - "GetMbdRequest": { - "required": [ - "idCIService", - "returnUrls" - ], - "type": "object", - "properties": { - "paymentNotices": { - "maxItems": 1, - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNotice" + "components" : { + "schemas" : { + "GetMbdRequest" : { + "required" : [ "idCIService", "returnUrls" ], + "type" : "object", + "properties" : { + "paymentNotices" : { + "maxItems" : 1, + "minItems" : 1, + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNotice" } }, - "idCIService": { - "type": "string" + "idCIService" : { + "type" : "string" }, - "returnUrls": { - "$ref": "#/components/schemas/ReturnUrls" + "returnUrls" : { + "$ref" : "#/components/schemas/ReturnUrls" } } }, - "PaymentNotice": { - "required": [ - "amount", - "email", - "firstName", - "fiscalCode", - "lastName", - "province" - ], - "type": "object", - "properties": { - "firstName": { - "type": "string" + "PaymentNotice" : { + "required" : [ "amount", "email", "firstName", "fiscalCode", "lastName", "province" ], + "type" : "object", + "properties" : { + "firstName" : { + "type" : "string" }, - "lastName": { - "type": "string" + "lastName" : { + "type" : "string" }, - "fiscalCode": { - "type": "string" + "fiscalCode" : { + "type" : "string" }, - "email": { - "type": "string" + "email" : { + "type" : "string" }, - "amount": { - "type": "integer", - "format": "int64" + "amount" : { + "type" : "integer", + "format" : "int64" }, - "province": { - "type": "string" + "province" : { + "type" : "string" }, - "documentHash": { - "maxLength": 44, - "minLength": 44, - "type": "string" + "documentHash" : { + "maxLength" : 44, + "minLength" : 44, + "type" : "string" } } }, - "ReturnUrls": { - "required": [ - "cancelUrl", - "errorUrl", - "successUrl" - ], - "type": "object", - "properties": { - "successUrl": { - "type": "string" + "ReturnUrls" : { + "required" : [ "cancelUrl", "errorUrl", "successUrl" ], + "type" : "object", + "properties" : { + "successUrl" : { + "type" : "string" }, - "cancelUrl": { - "type": "string" + "cancelUrl" : { + "type" : "string" }, - "errorUrl": { - "type": "string" + "errorUrl" : { + "type" : "string" } } }, - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + "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 + "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" + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" } } }, - "GetCartResponse": { - "type": "object", - "properties": { - "checkoutRedirectUrl": { - "type": "string" + "GetCartResponse" : { + "type" : "object", + "properties" : { + "checkoutRedirectUrl" : { + "type" : "string" }, - "navDownloadLink": { - "type": "string" + "navDownloadLink" : { + "type" : "string" }, - "mbdNav": { - "type": "string" + "mbdNav" : { + "type" : "string" } } }, - "GetCartErrorResponse": { - "type": "object", - "properties": { - "errorUrl": { - "type": "string" + "GetCartErrorResponse" : { + "type" : "object", + "properties" : { + "errorUrl" : { + "type" : "string" } } }, - "GetMdbReceipt": { - "type": "object", - "properties": { - "content": { - "type": "array", - "items": { - "type": "string", - "format": "byte" + "GetMdbReceipt" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "array", + "items" : { + "type" : "string", + "format" : "byte" } } } }, - "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 d6db871..2deeea0 100644 --- a/pom.xml +++ b/pom.xml @@ -161,9 +161,9 @@ - ${project.basedir}/src/main/resources/service.xsd + - + ${project.basedir}/src/main/resources/nodo-for-pa.xsd diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java index da98728..9b379b5 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java @@ -1,21 +1,29 @@ package it.gov.pagopa.mbd.service.client; -import com.fasterxml.jackson.databind.ObjectMapper; import it.gov.pagopa.mbd.service.exception.WebClientException; import it.gov.pagopa.mbd.service.model.carts.GetCartRequest; import it.gov.pagopa.mbd.service.model.carts.GetCartResponse; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeRequest; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeResponse; -import it.gov.pagopa.mbd.service.model.xml.node.soap.envelope.Envelope; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtReceiptV2; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtTransferListPAReceiptV2; import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtTransferPAReceiptV2; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.PaSendRTV2Request; +import it.gov.pagopa.mbd.service.model.xml.node.soap.envelope.Envelope; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; +import java.util.List; + +import static org.hibernate.validator.internal.util.Contracts.assertNotNull; +import static org.hibernate.validator.internal.util.Contracts.assertTrue; + @Component public class ReactiveClient { @@ -80,14 +88,27 @@ public Mono getCart(GetCartRequest getCartRequest) { } - public Mono getPaymentReceipt(String fiscalCode, String iuv) { + public Mono getPaymentReceipt(String fiscalCode, String iuv) { return webClient.get() .uri(String.format(clientDataConfig.getGetPaymentReceiptEndpoint(), fiscalCode, iuv)) .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getGetPaymentReceiptSubscriptionKey()) .retrieve() - .bodyToMono(CtTransferPAReceiptV2.class) - .onErrorMap(e -> new WebClientException(e.getMessage(), e)); + .bodyToMono(PaSendRTV2Request.class).map( + item -> { + assertNotNull(item); + CtReceiptV2 ctReceiptV2 = item.getReceipt(); + assertNotNull(ctReceiptV2); + CtTransferListPAReceiptV2 ctTransferListPAReceiptV2 = ctReceiptV2.getTransferList(); + assertNotNull(ctTransferListPAReceiptV2); + List ctTransferPAReceiptV2 = ctTransferListPAReceiptV2.getTransfer(); + assertTrue(!ctTransferPAReceiptV2.isEmpty(), "Missing ctTransferPAReceiptV2"); + assertNotNull(ctTransferPAReceiptV2.get(0).getMBDAttachment()); + return item; + } + ) + .onErrorMap(IllegalArgumentException.class, e -> e) + .onErrorMap(WebClientResponseException.class, e -> new WebClientException(e.getMessage(), e)); } diff --git a/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java b/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java index 154f7b8..651543a 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java +++ b/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java @@ -96,7 +96,7 @@ public Mono getMdb(@PathVariable("fiscalCodeEC") String fiscalCo @GetMapping(value = "/organizations/{fiscalCode}/receipt/{nav}", produces = MediaType.APPLICATION_XML_VALUE) public Mono getPaymentReceipts(@PathVariable("fiscalCode") String fiscalCode, @PathVariable("nav") String nav) { - return mdbService.getPaymentReceipts(fiscalCode, nav); - } + return mdbService.getPaymentReceipts(fiscalCode, nav).onErrorResume(Mono::error); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java index 57089e0..6d66185 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java @@ -130,7 +130,7 @@ protected Mono> handleMethodArgumentNotValid(MethodArgume } @ExceptionHandler({ConstraintViolationException.class}) - public Mono> handleMyException(ConstraintViolationException ex, ServerWebExchange exchange) { + public Mono> handleConstraintException(ConstraintViolationException ex, ServerWebExchange exchange) { log.warn("Validation Error raised:", ex); var errorResponse = ProblemJson.builder() @@ -141,6 +141,18 @@ public Mono> handleMyException(ConstraintViolationEx return Mono.just(new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST)); } + @ExceptionHandler({WebClientException.class}) + public Mono> handleWebClientException(WebClientException ex, ServerWebExchange exchange) { + log.warn("Validation Error raised:", ex); + var errorResponse = + ProblemJson.builder() + .status(HttpStatus.BAD_REQUEST.value()) + .title(AppError.INTERNAL_SERVER_ERROR.getTitle()) + .detail(ex.getMessage()) + .build(); + return Mono.just(new ResponseEntity<>(errorResponse, HttpStatus.INTERNAL_SERVER_ERROR)); + } + /** * Handle if a {@link FeignException} is raised * @@ -186,8 +198,8 @@ public Mono> handleFeignException( * @return a {@link ProblemJson} as response with the cause and with an appropriated HTTP status */ @ExceptionHandler({AppException.class}) - public ResponseEntity handleAppException( - final AppException ex, final WebRequest request) { + public Mono> handleAppException( + final AppException ex, final ServerWebExchange request) { if (ex.getCause() != null) { log.warn( "App Exception raised: " + ex.getMessage() + "\nCause of the App Exception: ", @@ -201,7 +213,7 @@ public ResponseEntity handleAppException( .title(ex.getTitle()) .detail(ex.getMessage()) .build(); - return new ResponseEntity<>(errorResponse, ex.getHttpStatus()); + return Mono.just(new ResponseEntity<>(errorResponse, ex.getHttpStatus())); } /** diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java new file mode 100644 index 0000000..218a042 --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java @@ -0,0 +1,95 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import jakarta.xml.bind.annotation.*; + + +/** + *

Classe Java per ctEntityUniqueIdentifier complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ctEntityUniqueIdentifier">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="entityUniqueIdentifierType" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}stEntityUniqueIdentifierType"/>
+ *         <element name="entityUniqueIdentifierValue" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}stEntityUniqueIdentifierValue"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ctEntityUniqueIdentifier", propOrder = { + "entityUniqueIdentifierType", + "entityUniqueIdentifierValue" +}) +public class CtEntityUniqueIdentifier { + + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StEntityUniqueIdentifierType entityUniqueIdentifierType; + @XmlElement(required = true) + protected String entityUniqueIdentifierValue; + + /** + * Recupera il valore della proprietà entityUniqueIdentifierType. + * + * @return + * possible object is + * {@link StEntityUniqueIdentifierType } + * + */ + public StEntityUniqueIdentifierType getEntityUniqueIdentifierType() { + return entityUniqueIdentifierType; + } + + /** + * Imposta il valore della proprietà entityUniqueIdentifierType. + * + * @param value + * allowed object is + * {@link StEntityUniqueIdentifierType } + * + */ + public void setEntityUniqueIdentifierType(StEntityUniqueIdentifierType value) { + this.entityUniqueIdentifierType = value; + } + + /** + * Recupera il valore della proprietà entityUniqueIdentifierValue. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEntityUniqueIdentifierValue() { + return entityUniqueIdentifierValue; + } + + /** + * Imposta il valore della proprietà entityUniqueIdentifierValue. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEntityUniqueIdentifierValue(String value) { + this.entityUniqueIdentifierValue = value; + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java new file mode 100644 index 0000000..f119dfb --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -0,0 +1,825 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtMetadata; +import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; +import jakarta.xml.bind.annotation.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.xml.datatype.XMLGregorianCalendar; +import java.math.BigDecimal; + + +/** + *

Classe Java per ctReceiptV2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ctReceiptV2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="receiptId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="noticeNumber" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stNoticeNumber"/>
+ *         <element name="fiscalCode" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stFiscalCodePA"/>
+ *         <element name="outcome" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stOutcome"/>
+ *         <element name="creditorReferenceId" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="paymentAmount" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stAmount"/>
+ *         <element name="description" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText140"/>
+ *         <element name="companyName" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText140"/>
+ *         <element name="officeName" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText140" minOccurs="0"/>
+ *         <element name="debtor" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctSubject"/>
+ *         <element name="transferList" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctTransferListPAReceiptV2"/>
+ *         <element name="idPSP" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="pspFiscalCode" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70" minOccurs="0"/>
+ *         <element name="pspPartitaIVA" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}stText20" minOccurs="0"/>
+ *         <element name="PSPCompanyName" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70"/>
+ *         <element name="idChannel" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="channelDescription" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="payer" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctSubject" minOccurs="0"/>
+ *         <element name="paymentMethod" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35" minOccurs="0"/>
+ *         <element name="paymentNote" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}stText210" minOccurs="0"/>
+ *         <element name="fee" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stAmount" minOccurs="0"/>
+ *         <element name="primaryCiIncurredFee" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stAmount" minOccurs="0"/>
+ *         <element name="idBundle" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70" minOccurs="0"/>
+ *         <element name="idCiBundle" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70" minOccurs="0"/>
+ *         <element name="paymentDateTime" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stISODateTime" minOccurs="0"/>
+ *         <element name="applicationDate" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stISODate" minOccurs="0"/>
+ *         <element name="transferDate" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stISODate" minOccurs="0"/>
+ *         <element name="metadata" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}ctMetadata" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ctReceiptV2", propOrder = { + "receiptId", + "noticeNumber", + "fiscalCode", + "outcome", + "creditorReferenceId", + "paymentAmount", + "description", + "companyName", + "officeName", + "debtor", + "transferList", + "idPSP", + "pspFiscalCode", + "pspPartitaIVA", + "pspCompanyName", + "idChannel", + "channelDescription", + "payer", + "paymentMethod", + "paymentNote", + "fee", + "primaryCiIncurredFee", + "idBundle", + "idCiBundle", + "paymentDateTime", + "applicationDate", + "transferDate", + "metadata" +}) +@AllArgsConstructor +@NoArgsConstructor +@Data +@Builder +public class CtReceiptV2 { + + @XmlElement(required = true) + protected String receiptId; + @XmlElement(required = true) + protected String noticeNumber; + @XmlElement(required = true) + protected String fiscalCode; + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StOutcome outcome; + @XmlElement(required = true) + protected String creditorReferenceId; + @XmlElement(required = true) + protected BigDecimal paymentAmount; + @XmlElement(required = true) + protected String description; + @XmlElement(required = true) + protected String companyName; + protected String officeName; + @XmlElement(required = true) + protected CtSubject debtor; + @XmlElement(required = true) + protected CtTransferListPAReceiptV2 transferList; + @XmlElement(required = true) + protected String idPSP; + protected String pspFiscalCode; + protected String pspPartitaIVA; + @XmlElement(name = "PSPCompanyName", required = true) + protected String pspCompanyName; + @XmlElement(required = true) + protected String idChannel; + @XmlElement(required = true) + protected String channelDescription; + protected CtSubject payer; + protected String paymentMethod; + protected String paymentNote; + protected BigDecimal fee; + protected BigDecimal primaryCiIncurredFee; + protected String idBundle; + protected String idCiBundle; + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar paymentDateTime; + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar applicationDate; + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar transferDate; + protected CtMetadata metadata; + + /** + * Recupera il valore della proprietà receiptId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReceiptId() { + return receiptId; + } + + /** + * Imposta il valore della proprietà receiptId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReceiptId(String value) { + this.receiptId = value; + } + + /** + * Recupera il valore della proprietà noticeNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNoticeNumber() { + return noticeNumber; + } + + /** + * Imposta il valore della proprietà noticeNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNoticeNumber(String value) { + this.noticeNumber = value; + } + + /** + * Recupera il valore della proprietà fiscalCode. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFiscalCode() { + return fiscalCode; + } + + /** + * Imposta il valore della proprietà fiscalCode. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFiscalCode(String value) { + this.fiscalCode = value; + } + + /** + * Recupera il valore della proprietà outcome. + * + * @return + * possible object is + * {@link StOutcome } + * + */ + public StOutcome getOutcome() { + return outcome; + } + + /** + * Imposta il valore della proprietà outcome. + * + * @param value + * allowed object is + * {@link StOutcome } + * + */ + public void setOutcome(StOutcome value) { + this.outcome = value; + } + + /** + * Recupera il valore della proprietà creditorReferenceId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreditorReferenceId() { + return creditorReferenceId; + } + + /** + * Imposta il valore della proprietà creditorReferenceId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreditorReferenceId(String value) { + this.creditorReferenceId = value; + } + + /** + * Recupera il valore della proprietà paymentAmount. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + /** + * Imposta il valore della proprietà paymentAmount. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setPaymentAmount(BigDecimal value) { + this.paymentAmount = value; + } + + /** + * Recupera il valore della proprietà description. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Imposta il valore della proprietà description. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Recupera il valore della proprietà companyName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCompanyName() { + return companyName; + } + + /** + * Imposta il valore della proprietà companyName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCompanyName(String value) { + this.companyName = value; + } + + /** + * Recupera il valore della proprietà officeName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOfficeName() { + return officeName; + } + + /** + * Imposta il valore della proprietà officeName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOfficeName(String value) { + this.officeName = value; + } + + /** + * Recupera il valore della proprietà debtor. + * + * @return + * possible object is + * {@link CtSubject } + * + */ + public CtSubject getDebtor() { + return debtor; + } + + /** + * Imposta il valore della proprietà debtor. + * + * @param value + * allowed object is + * {@link CtSubject } + * + */ + public void setDebtor(CtSubject value) { + this.debtor = value; + } + + /** + * Recupera il valore della proprietà transferList. + * + * @return + * possible object is + * {@link CtTransferListPAReceiptV2 } + * + */ + public CtTransferListPAReceiptV2 getTransferList() { + return transferList; + } + + /** + * Imposta il valore della proprietà transferList. + * + * @param value + * allowed object is + * {@link CtTransferListPAReceiptV2 } + * + */ + public void setTransferList(CtTransferListPAReceiptV2 value) { + this.transferList = value; + } + + /** + * Recupera il valore della proprietà idPSP. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdPSP() { + return idPSP; + } + + /** + * Imposta il valore della proprietà idPSP. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdPSP(String value) { + this.idPSP = value; + } + + /** + * Recupera il valore della proprietà pspFiscalCode. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPspFiscalCode() { + return pspFiscalCode; + } + + /** + * Imposta il valore della proprietà pspFiscalCode. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPspFiscalCode(String value) { + this.pspFiscalCode = value; + } + + /** + * Recupera il valore della proprietà pspPartitaIVA. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPspPartitaIVA() { + return pspPartitaIVA; + } + + /** + * Imposta il valore della proprietà pspPartitaIVA. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPspPartitaIVA(String value) { + this.pspPartitaIVA = value; + } + + /** + * Recupera il valore della proprietà pspCompanyName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPSPCompanyName() { + return pspCompanyName; + } + + /** + * Imposta il valore della proprietà pspCompanyName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPSPCompanyName(String value) { + this.pspCompanyName = value; + } + + /** + * Recupera il valore della proprietà idChannel. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdChannel() { + return idChannel; + } + + /** + * Imposta il valore della proprietà idChannel. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdChannel(String value) { + this.idChannel = value; + } + + /** + * Recupera il valore della proprietà channelDescription. + * + * @return + * possible object is + * {@link String } + * + */ + public String getChannelDescription() { + return channelDescription; + } + + /** + * Imposta il valore della proprietà channelDescription. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setChannelDescription(String value) { + this.channelDescription = value; + } + + /** + * Recupera il valore della proprietà payer. + * + * @return + * possible object is + * {@link CtSubject } + * + */ + public CtSubject getPayer() { + return payer; + } + + /** + * Imposta il valore della proprietà payer. + * + * @param value + * allowed object is + * {@link CtSubject } + * + */ + public void setPayer(CtSubject value) { + this.payer = value; + } + + /** + * Recupera il valore della proprietà paymentMethod. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPaymentMethod() { + return paymentMethod; + } + + /** + * Imposta il valore della proprietà paymentMethod. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPaymentMethod(String value) { + this.paymentMethod = value; + } + + /** + * Recupera il valore della proprietà paymentNote. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPaymentNote() { + return paymentNote; + } + + /** + * Imposta il valore della proprietà paymentNote. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPaymentNote(String value) { + this.paymentNote = value; + } + + /** + * Recupera il valore della proprietà fee. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getFee() { + return fee; + } + + /** + * Imposta il valore della proprietà fee. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setFee(BigDecimal value) { + this.fee = value; + } + + /** + * Recupera il valore della proprietà primaryCiIncurredFee. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getPrimaryCiIncurredFee() { + return primaryCiIncurredFee; + } + + /** + * Imposta il valore della proprietà primaryCiIncurredFee. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setPrimaryCiIncurredFee(BigDecimal value) { + this.primaryCiIncurredFee = value; + } + + /** + * Recupera il valore della proprietà idBundle. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdBundle() { + return idBundle; + } + + /** + * Imposta il valore della proprietà idBundle. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdBundle(String value) { + this.idBundle = value; + } + + /** + * Recupera il valore della proprietà idCiBundle. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdCiBundle() { + return idCiBundle; + } + + /** + * Imposta il valore della proprietà idCiBundle. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdCiBundle(String value) { + this.idCiBundle = value; + } + + /** + * Recupera il valore della proprietà paymentDateTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getPaymentDateTime() { + return paymentDateTime; + } + + /** + * Imposta il valore della proprietà paymentDateTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setPaymentDateTime(XMLGregorianCalendar value) { + this.paymentDateTime = value; + } + + /** + * Recupera il valore della proprietà applicationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getApplicationDate() { + return applicationDate; + } + + /** + * Imposta il valore della proprietà applicationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setApplicationDate(XMLGregorianCalendar value) { + this.applicationDate = value; + } + + /** + * Recupera il valore della proprietà transferDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getTransferDate() { + return transferDate; + } + + /** + * Imposta il valore della proprietà transferDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setTransferDate(XMLGregorianCalendar value) { + this.transferDate = value; + } + + /** + * Recupera il valore della proprietà metadata. + * + * @return + * possible object is + * {@link CtMetadata } + * + */ + public CtMetadata getMetadata() { + return metadata; + } + + /** + * Imposta il valore della proprietà metadata. + * + * @param value + * allowed object is + * {@link CtMetadata } + * + */ + public void setMetadata(CtMetadata value) { + this.metadata = value; + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java new file mode 100644 index 0000000..a1aea4a --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java @@ -0,0 +1,287 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ctSubject complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ctSubject">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="uniqueIdentifier" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctEntityUniqueIdentifier"/>
+ *         <element name="fullName" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70"/>
+ *         <element name="streetName" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText70" minOccurs="0"/>
+ *         <element name="civicNumber" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText16" minOccurs="0"/>
+ *         <element name="postalCode" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText16" minOccurs="0"/>
+ *         <element name="city" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35" minOccurs="0"/>
+ *         <element name="stateProvinceRegion" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35" minOccurs="0"/>
+ *         <element name="country" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stNazioneProvincia" minOccurs="0"/>
+ *         <element name="e-mail" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stEMail" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ctSubject", propOrder = { + "uniqueIdentifier", + "fullName", + "streetName", + "civicNumber", + "postalCode", + "city", + "stateProvinceRegion", + "country", + "eMail" +}) +public class CtSubject { + + @XmlElement(required = true) + protected CtEntityUniqueIdentifier uniqueIdentifier; + @XmlElement(required = true) + protected String fullName; + protected String streetName; + protected String civicNumber; + protected String postalCode; + protected String city; + protected String stateProvinceRegion; + protected String country; + @XmlElement(name = "e-mail") + protected String eMail; + + /** + * Recupera il valore della proprietà uniqueIdentifier. + * + * @return + * possible object is + * {@link CtEntityUniqueIdentifier } + * + */ + public CtEntityUniqueIdentifier getUniqueIdentifier() { + return uniqueIdentifier; + } + + /** + * Imposta il valore della proprietà uniqueIdentifier. + * + * @param value + * allowed object is + * {@link CtEntityUniqueIdentifier } + * + */ + public void setUniqueIdentifier(CtEntityUniqueIdentifier value) { + this.uniqueIdentifier = value; + } + + /** + * Recupera il valore della proprietà fullName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFullName() { + return fullName; + } + + /** + * Imposta il valore della proprietà fullName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFullName(String value) { + this.fullName = value; + } + + /** + * Recupera il valore della proprietà streetName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStreetName() { + return streetName; + } + + /** + * Imposta il valore della proprietà streetName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStreetName(String value) { + this.streetName = value; + } + + /** + * Recupera il valore della proprietà civicNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCivicNumber() { + return civicNumber; + } + + /** + * Imposta il valore della proprietà civicNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCivicNumber(String value) { + this.civicNumber = value; + } + + /** + * Recupera il valore della proprietà postalCode. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPostalCode() { + return postalCode; + } + + /** + * Imposta il valore della proprietà postalCode. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPostalCode(String value) { + this.postalCode = value; + } + + /** + * Recupera il valore della proprietà city. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCity() { + return city; + } + + /** + * Imposta il valore della proprietà city. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCity(String value) { + this.city = value; + } + + /** + * Recupera il valore della proprietà stateProvinceRegion. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStateProvinceRegion() { + return stateProvinceRegion; + } + + /** + * Imposta il valore della proprietà stateProvinceRegion. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStateProvinceRegion(String value) { + this.stateProvinceRegion = value; + } + + /** + * Recupera il valore della proprietà country. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCountry() { + return country; + } + + /** + * Imposta il valore della proprietà country. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCountry(String value) { + this.country = value; + } + + /** + * Recupera il valore della proprietà eMail. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEMail() { + return eMail; + } + + /** + * Imposta il valore della proprietà eMail. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEMail(String value) { + this.eMail = value; + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java new file mode 100644 index 0000000..cb613e0 --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java @@ -0,0 +1,85 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.ArrayList; +import java.util.List; + + +/** + *

Classe Java per ctTransferListPAReceiptV2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ctTransferListPAReceiptV2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="transfer" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctTransferPAReceiptV2" maxOccurs="5"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ctTransferListPAReceiptV2", propOrder = { + "transfer" +}) +@AllArgsConstructor +@NoArgsConstructor +@Data +@Builder +public class CtTransferListPAReceiptV2 { + + @XmlElement(required = true) + protected List transfer; + + /** + * Gets the value of the transfer property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the Jakarta XML Binding object. + * This is why there is not a set method for the transfer property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTransfer().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CtTransferPAReceiptV2 } + * + * + */ + public List getTransfer() { + if (transfer == null) { + transfer = new ArrayList(); + } + return this.transfer; + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java index 0e6dce8..a1f9634 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java @@ -2,7 +2,7 @@ // Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 // Vedere https://eclipse-ee4j.github.io/jaxb-ri // Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.25 alle 06:15:33 PM CET +// Generato il: 2024.12.18 alle 10:59:02 AM CET // diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java index a0cc3d4..27e78fd 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java @@ -2,7 +2,7 @@ // Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 // Vedere https://eclipse-ee4j.github.io/jaxb-ri // Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.25 alle 06:15:33 PM CET +// Generato il: 2024.12.18 alle 10:59:02 AM CET // @@ -44,4 +44,44 @@ public CtTransferPAReceiptV2 createCtTransferPAReceiptV2() { return new CtTransferPAReceiptV2(); } + /** + * Create an instance of {@link PaSendRTV2Request } + * + */ + public PaSendRTV2Request createPaSendRTV2Request() { + return new PaSendRTV2Request(); + } + + /** + * Create an instance of {@link CtReceiptV2 } + * + */ + public CtReceiptV2 createCtReceiptV2() { + return new CtReceiptV2(); + } + + /** + * Create an instance of {@link CtSubject } + * + */ + public CtSubject createCtSubject() { + return new CtSubject(); + } + + /** + * Create an instance of {@link CtEntityUniqueIdentifier } + * + */ + public CtEntityUniqueIdentifier createCtEntityUniqueIdentifier() { + return new CtEntityUniqueIdentifier(); + } + + /** + * Create an instance of {@link CtTransferListPAReceiptV2 } + * + */ + public CtTransferListPAReceiptV2 createCtTransferListPAReceiptV2() { + return new CtTransferListPAReceiptV2(); + } + } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java new file mode 100644 index 0000000..d8ef11e --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -0,0 +1,161 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + + +/** + *

Classe Java per paSendRTV2Request complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="paSendRTV2Request">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="idPA" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="idBrokerPA" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="idStation" type="{http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/}stText35"/>
+ *         <element name="receipt" type="{http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd}ctReceiptV2"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "paSendRTV2Request", propOrder = { + "idPA", + "idBrokerPA", + "idStation", + "receipt" +}) +@AllArgsConstructor +@NoArgsConstructor +@Builder +@Data +public class PaSendRTV2Request { + + @XmlElement(required = true) + protected String idPA; + @XmlElement(required = true) + protected String idBrokerPA; + @XmlElement(required = true) + protected String idStation; + @XmlElement(required = true) + protected CtReceiptV2 receipt; + + /** + * Recupera il valore della proprietà idPA. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdPA() { + return idPA; + } + + /** + * Imposta il valore della proprietà idPA. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdPA(String value) { + this.idPA = value; + } + + /** + * Recupera il valore della proprietà idBrokerPA. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdBrokerPA() { + return idBrokerPA; + } + + /** + * Imposta il valore della proprietà idBrokerPA. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdBrokerPA(String value) { + this.idBrokerPA = value; + } + + /** + * Recupera il valore della proprietà idStation. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdStation() { + return idStation; + } + + /** + * Imposta il valore della proprietà idStation. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdStation(String value) { + this.idStation = value; + } + + /** + * Recupera il valore della proprietà receipt. + * + * @return + * possible object is + * {@link CtReceiptV2 } + * + */ + public CtReceiptV2 getReceipt() { + return receipt; + } + + /** + * Imposta il valore della proprietà receipt. + * + * @param value + * allowed object is + * {@link CtReceiptV2 } + * + */ + public void setReceipt(CtReceiptV2 value) { + this.receipt = value; + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java new file mode 100644 index 0000000..f747699 --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java @@ -0,0 +1,45 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + + +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per stEntityUniqueIdentifierType. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ * <simpleType name="stEntityUniqueIdentifierType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="F"/>
+ *     <enumeration value="G"/>
+ *     <length value="1"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "stEntityUniqueIdentifierType") +@XmlEnum +public enum StEntityUniqueIdentifierType { + + F, + G; + + public String value() { + return name(); + } + + public static StEntityUniqueIdentifierType fromValue(String v) { + return valueOf(v); + } + +} diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java new file mode 100644 index 0000000..4a3a74e --- /dev/null +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java @@ -0,0 +1,9 @@ +// +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET +// + +@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd") +package it.gov.pagopa.mbd.service.model.xml.node.pafornode; diff --git a/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java b/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java index 7b037a1..8137cdd 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java +++ b/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java @@ -120,13 +120,18 @@ public Mono getMbd(String fiscalCodeEC, GetMbdRequest request) { public Mono getPaymentReceipts(String fiscalCode, String nav) { return Mono.zip(Mono.just(fiscalCode),Mono.just(nav).map(item -> nav.substring(1))) .flatMap(tuple -> reactiveSoapClient.getPaymentReceipt(tuple.getT1(),tuple.getT2())) - .onErrorResume(e -> { + .onErrorMap(WebClientException.class, e -> { log.error("Encountered an error during getPaymentReceiptCall Call: {}", e.getMessage()); - return Mono.error(new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e)); + return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); + }) + .onErrorMap(IllegalArgumentException.class, e -> { + log.error("Encountered an error extracting receipt content: {}", e.getMessage()); + return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); }) .map(item -> ResponseEntity.ok() .header("Content-Type", APPLICATION_JSON_VALUE) - .body(GetMdbReceipt.builder().content(item.getMBDAttachment()).build())); + .body(GetMdbReceipt.builder().content(item.getReceipt().getTransferList() + .getTransfer().get(0).getMBDAttachment()).build())); } diff --git a/src/main/resources/nodo-for-pa.xsd b/src/main/resources/nodo-for-pa.xsd index ed52bcf..d8e2ca1 100644 --- a/src/main/resources/nodo-for-pa.xsd +++ b/src/main/resources/nodo-for-pa.xsd @@ -96,4 +96,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java b/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java index 57c89ce..3d6ca88 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java @@ -9,7 +9,7 @@ import it.gov.pagopa.mbd.service.model.carts.GetCartResponse; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeRequest; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeResponse; -import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtTransferPAReceiptV2; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.PaSendRTV2Request; import jakarta.inject.Inject; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; @@ -119,19 +119,64 @@ void getCartWithKOResponse() { @Test void getPaymentReceiptWithOk() throws JsonProcessingException { WIRE_MOCK_EXTENSION.stubFor(get(urlMatching("/receipt/.*")) - .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_JSON_VALUE) - .withBody(mapper.writeValueAsString(CtTransferPAReceiptV2.builder().build())))); - Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); - CtTransferPAReceiptV2 getResponse = getResponseMono.block(); + .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_XML_VALUE) + .withBody( + "\n" + + "\n" + + " 99999000013\n" + + " 15376371009\n" + + " 15376371009_48\n" + + " \n" + + " 7d7cfaeb94a742bda3c8d389a3259293\n" + + " 348173447377455101\n" + + " 99999000013\n" + + " OK\n" + + " 48173447377455101\n" + + " 16.00\n" + + " Pagamento marca da bollo digitale\n" + + " EC DEMO\n" + + " \n" + + " \n" + + " F\n" + + " ANONIMO\n" + + " \n" + + " ANONIMO\n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 16.00\n" + + " 99999000013\n" + + " \n" + + " PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWFyY2FEYUJvbGxvIHhtbG5zPSJodHRwOi8vd3d3LmFnZW56aWFlbnRyYXRlLmdvdi5pdC8yMDE0L01hcmNhRGFCb2xsbyIgeG1sbnM6bnMyPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIj48UFNQPjxDb2RpY2VGaXNjYWxlPjAwNzk5OTYwMTU4PC9Db2RpY2VGaXNjYWxlPjxEZW5vbWluYXppb25lPkludGVzYSBTYW5wYW9sbyBTLnAuQS48L0Rlbm9taW5hemlvbmU+PC9QU1A+PElVQkQ+MDEyNDAwMDIxODA2NDY8L0lVQkQ+PE9yYUFjcXVpc3RvPjIwMjQtMDctMDhUMjA6MTg6MDErMDI6MDA8L09yYUFjcXVpc3RvPjxJbXBvcnRvPjE2LjAwPC9JbXBvcnRvPjxUaXBvQm9sbG8+MDE8L1RpcG9Cb2xsbz48SW1wcm9udGFEb2N1bWVudG8+PERpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMDQveG1sZW5jI3NoYTI1NiIvPjxuczI6RGlnZXN0VmFsdWU+MXRyQTVxeWpTWk53aXd0R0c0NmR5alJwTDE2VEZnR0NGdm5mRnpRckZIYkI8L25zMjpEaWdlc3RWYWx1ZT48L0ltcHJvbnRhRG9jdW1lbnRvPjxTaWduYXR1cmUgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxTaWduZWRJbmZvPjxDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tMjAwMTAzMTUiLz48U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPjxSZWZlcmVuY2UgVVJJPSIiPjxUcmFuc2Zvcm1zPjxUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjZW52ZWxvcGVkLXNpZ25hdHVyZSIvPjwvVHJhbnNmb3Jtcz48RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+PERpZ2VzdFZhbHVlPlI4bGZHeUluMFZENCtUV0NSajJKM0pkTkY3MWxDYk9USDNkYVRPVVVGRWs9PC9EaWdlc3RWYWx1ZT48L1JlZmVyZW5jZT48L1NpZ25lZEluZm8+PFNpZ25hdHVyZVZhbHVlPllWbFpLVk90WXRPYjYvamNUSUFCUFpkZThNVE9UZnZXdURSemhhZFY0S2czWHFoU2JBNUhEd042MmNDNEJIL0dzNGpMdHlnSGxzMFVHdXd6RngyUWJnZTU1b1lCZmV6d3RveDVZL0lGNDM2bk5KWkxYNXY0bjJwd1A3Z3ZZYWp2WERKNVdSaEswOXZmblZoRkU1Z2pEOUhGNEVwa3hyaDRkeWpHUU1rN2dCVVdIR0YrN3ZHUzV1U1dxc2RReGVIemhMSnZKMWx6Qi8zVjJsZHR5emd0M2tzd1FHTkUyYmtGWmZWZTFOK0wreTQ1MUpVZWNtK05hdndxbHdscU1KUDU2SnhlTE5JSzZRaVVrWmtMTU9TSW8zT1FIMjM0b3BVOTRtSFhTcUdaMXdmVmVhRVdzUWphY3JwUjBWd0FWV1hNNWttblp5Qy9oMHcyUTlnYUVuUnJpUT09PC9TaWduYXR1cmVWYWx1ZT48S2V5SW5mbz48WDUwOURhdGE+PFg1MDlDZXJ0aWZpY2F0ZT5NSUlFdFRDQ0FwMmdBd0lCQWdJSVZYYXBaMXY4OVlBd0RRWUpLb1pJaHZjTkFRRUxCUUF3YURFTE1Ba0dBMVVFQmhNQ1NWUXhIakFjQmdOVkJBb01GVUZuWlc1NmFXRWdaR1ZzYkdVZ1JXNTBjbUYwWlRFYk1Ca0dBMVVFQ3d3U1UyVnlkbWw2YVNCVVpXeGxiV0YwYVdOcE1Sd3dHZ1lEVlFRRERCTkRRU0JDYjJ4c2J5QlVaV3hsYldGMGFXTnZNQjRYRFRFNU1UQXdNakV6TlRneE4xb1hEVEkxTVRBd01qRXpOVGd4TjFvd1pURUxNQWtHQTFVRUJoTUNTVlF4SGpBY0JnTlZCQW9NRlVGblpXNTZhV0VnWkdWc2JHVWdSVzUwY21GMFpURU1NQW9HQTFVRUN3d0RVRk5RTVNnd0pnWURWUVFEREI4d01EYzVPVGsyTURFMU9DQkpUbFJGVTBFZ1UwRk9VRUZQVEU4Z1UxQkJNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXZLR2d1Q0hwSkJEVVdzUmJZemFMeEg3c3dXM3E0NlRnSitpUDBEYWlXYkkvVEJna0NGUnJ1cE5OeEk2dlI0eFBpUStDYTJ4NEEycVFjYm16eTVTblZ1MGpLeDU2cTlZQ0REYjVRUXZYZHlaUlYraUFwVjhFZ1FiSGJqcW8yTHFRR2NWbWVJNE43b3pDZWQ1cEF6aHdGKytOZkUyWHFpR1pXQ2g1YlhhbkRrM2EveEJ5L2J4WTM0N01GTGtqaE5sZU9vS09jVnRtWmtMbXErU3RJcWJ5VjY2ek9PbXd3UHgzRnhidDkzNGJqRVdSRk5mVktDMTZMZDYwd04wcXk4Z2tuSnRONmg3TWNGbWpHR2tqdWxVMy8rOGxkTjI4dzJ4NWNOZ3dwMmhFY1BwMEJmNmdrU0tRRm9hTjExbzkvd0poSzJFbTZUV3plcWlFQVhVcS9nSHJPUUlEQVFBQm8yWXdaREFmQmdOVkhTTUVHREFXZ0JRcVI3Si9JVXkveTk0SWpkTDRPZXJ2cjk1Q1JEQVNCZ05WSFNBRUN6QUpNQWNHQlN0TUhRRUpNQjBHQTFVZERnUVdCQlFxQnl6UzRTdHZ1QzhjZFdLUnNtK2VZbmdFUERBT0JnTlZIUThCQWY4RUJBTUNCa0F3RFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUFhV3RvbzBHSUlwekJ5ZHluZWMxcFNoUUxkdUZLUEh5cHVTNDFzVEp3YXJJWEV0YzBQc0VydzZaYXpxVGkwak9SQ3gxNVFibzBZbHE0QldFN1pzU1IxNGZnVzlmRU1TSEdRZWF4dDFuNFBlQ1BSN0FKWXdVNkx5azBDYXNTWllaZ0N3RUJMeEJyL2hLR01ya2lrUDJCRm5MbDVUUHBBZlhXWllQTHBhVWE4dC9SSFJtMllmNXhqOStHT0ZLdkJjNmU5bGlFRzQyUGc4d2w3RlZwQUkvV25ESHprTDBCOEtrTDVNOHVzdmlCOEd0dlFHdU0xU1o3Z3NyY29tcTQ4Y1FTQXgvci9Xa1B4NXdzUTlIM0NJTERGRXN5T3YrTTd4S3liN0FSV3l3Sm81QVVOYTRGMEtaYjlZQlJtQ0dqN21iTWpNTG5hbVlKeURtYkoyN0szUitoeHJyY2xjZnVSMjdIWTJkVG11dFRxanJWZmZhM0JqWVZ2bnFCVkdoRUU2WHFTVXF2YlJiTTV1VmFhWHpwWEJPMHlGS1duNGVzQ0hkbVlVWkRtY0FUcTVEMW03aU8rdUN0TVMvQXZMWE82dTljT3JyUVhGaHFFREdCUzcxcCs1VzlJR2Q3ZTJ6NDNJcTdNSm9nT2J1bGxOSHJYNS8yTFlZM0hhbisyZFNYQmxuRkN3ZStsOXNZdGZnMVZWekdlTlh1YTNxc2JLdXMwU3pUZ3NmUmlKY1dZM0t0WFRQemUrYWFwN0J4elY0NXFheDlsalN2dzhQNXNFRUM3R2JzV2tJeGxpU3NMNUV5NWg2ZDNKaTR6K3ltWndvQ2hZY0lRUUcrb05QVjM0TVMzbmVKTHlXYjBIanhtbkZuNk9IQ010OFpzM2tVZDkrMWI3MlAvRVhhM0VHZ2djPC9YNTA5Q2VydGlmaWNhdGU+PFg1MDlDUkw+TUlJQzR6Q0J6QUlCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREJvTVFzd0NRWURWUVFHRXdKSlZERWVNQndHQTFVRUNnd1ZRV2RsYm5wcFlTQmtaV3hzWlNCRmJuUnlZWFJsTVJzd0dRWURWUVFMREJKVFpYSjJhWHBwSUZSbGJHVnRZWFJwWTJreEhEQWFCZ05WQkFNTUUwTkJJRUp2Ykd4dklGUmxiR1Z0WVhScFkyOFhEVEkwTVRJeE56RXpNekkxTWxvWERUSTBNVEl4T0RFek16STFNVnFnTURBdU1COEdBMVVkSXdRWU1CYUFGQ3BIc244aFRML0wzZ2lOMHZnNTZ1K3Yza0pFTUFzR0ExVWRGQVFFQWdJWGZqQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFkMTNsZWF2QXlDc3NabWx0UDg3K0FwV3hESnlta3l5djJvVlVTL0RSclRJeWxmUlJEb2dzNWpZbVRENzA2ZWlLeU5yNzRWU0VFOFkyanVtOEdFckVPdnBjd1JxSzNyRUFjTXExSE81WXZOMnkrRjlVdncwb2ZQZUllU0R0NDVQbEw4WHoydGF4UE5qV3JFMUNFQVUyQ3VHT1ljRlpERVpPRlllcjJ2d2JlTjQ2bUo3aGFjM09zNnRtRWpwVnZya2hjaVk4RlkvdUxNbmZPZE9vam1SU3pUM3Nyek9LbkEyVUxiaHc0VGp0UFBIbFdyd0ZFSFowR1A0eFNZdEoxTnhxeTFtZ21BVW1jd3I5ckI4NElOZmlXUy9ORGlmVmpzYUlNeW9PNG1OTGw0WmdCZUtkUlFIVG9zYUJob29tMitMdjIzNjAybEsvNzVUVE5zblZlb08wUWVMZGpSd2x5citoNDZZLzB3NFRDZmNRMHNpVktGcC8ya1pGZktFOU1YeFlQdmhtQnF4VVJHbHM1L1g4VzVzT2cyUER4M1ViZkdoMi9LODZqRklScmxrQmNISmFjNENiODV3aWQ0bUo3aDNJK2R3dmtUNUxCK2tWcURkMGZuQURxTDEvaGwvT0lhRW1JdzNQanRzSDlwSHQ2UjdzY2lXN242ZmtwSG9ZOXB2dk9wZlhmcGVvTFVMSGpWbUhhUnFkN0dkc21GSjdFbmpYblVOWXJpNDZKYkh0ZUNsM3AvNk9mcFY3NUtjTVNIVGlJYks5SkFITFBGNlpDOUdycEJuT0s2eTBmUTZqWm5yNWNVQ2tESFNMQlprYkx5Kzhzd1liYnI5T2RwbnRlL1JOS1BPQ2VDVmdnQzBhN0VOaXBKeko3K2plaW03cktIKzB0ak1XSExlRUdCND08L1g1MDlDUkw+PC9YNTA5RGF0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9tYXJjYURhQm9sbG8+\n" + + " Pagamento marca da bollo digitale\n" + + " 9/0702103TS/\n" + + " \n" + + " \n" + + " BCITITMM\n" + + " 00799960158\n" + + " Intesa Sanpaolo S.p.A\n" + + " 00799960158_01_ONUS\n" + + " app\n" + + " creditCard\n" + + " 0.50\n" + + " c47c5e72-ec53-4be7-bcbb-ad7554ba13d7\n" + + " 2024-12-17T23:18:16\n" + + " 2024-12-17\n" + + " 2024-12-18\n" + + " \n" + + "" + ))); + Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); + PaSendRTV2Request getResponse = getResponseMono.block(); assertNotNull(getResponse); } @Test void getPaymentReceiptWithKO() throws JsonProcessingException { WIRE_MOCK_EXTENSION.stubFor(get(urlMatching("/receipt/.*")) - .willReturn(aResponse().withStatus(500).withHeader("Content-Type", APPLICATION_JSON_VALUE) - .withBody(mapper.writeValueAsString(CtTransferPAReceiptV2.builder().build())))); - Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); + .willReturn(aResponse().withStatus(500))); + Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); assertThrows(WebClientException.class, () -> getResponseMono.block()); } diff --git a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java index 0faa82c..796a953 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java @@ -8,20 +8,27 @@ import it.gov.pagopa.mbd.service.model.mdb.PaymentNotice; import it.gov.pagopa.mbd.service.model.mdb.ReturnUrls; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.*; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtReceiptV2; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtTransferListPAReceiptV2; import it.gov.pagopa.mbd.service.model.xml.node.pafornode.CtTransferPAReceiptV2; +import it.gov.pagopa.mbd.service.model.xml.node.pafornode.PaSendRTV2Request; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; import it.gov.pagopa.mbd.service.service.MbdService; import jakarta.inject.Inject; import jakarta.validation.ConstraintViolationException; import org.junit.jupiter.api.Test; +import org.mockito.Mockito; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; +import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import java.math.BigDecimal; +import java.nio.charset.Charset; import java.util.Collections; import static org.junit.jupiter.api.Assertions.*; @@ -184,15 +191,23 @@ void getMdbShouldReturnKOOnInvalidData() throws DatatypeConfigurationException { @Test void getPaymentReceiptsShouldReturnOk() { when(reactiveClient.getPaymentReceipt(any(),any())).thenAnswer( - item -> Mono.just(CtTransferPAReceiptV2.builder().mbdAttachment("test".getBytes()).build())); + item -> Mono.just(PaSendRTV2Request.builder().receipt( + CtReceiptV2.builder().transferList( + CtTransferListPAReceiptV2.builder() + .transfer(Collections.singletonList( + CtTransferPAReceiptV2.builder() + .mbdAttachment("test".getBytes()) + .build() + )).build()).build()).build())); ResponseEntity responseEntity = mbdService.getPaymentReceipts("test","test").block(); assertTrue(responseEntity.getStatusCode().is2xxSuccessful()); } @Test void getPaymentReceiptsShouldReturnKoException() { + WebClientException error = new WebClientException("Error on test call", null); when(reactiveClient.getPaymentReceipt(any(),any())).thenAnswer( - item -> Mono.error(new RuntimeException("Test Error"))); + item -> Mono.error(error)); assertThrows(AppException.class, () -> mbdService.getPaymentReceipts("test","test").block()); } From 541c8f0b42ef901186dd6c2bc6557ac9cac65e2e Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:58:47 +0100 Subject: [PATCH 06/28] Update src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../java/it/gov/pagopa/mbd/service/client/ReactiveClient.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java index 9b379b5..8ac0861 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java @@ -1,5 +1,8 @@ package it.gov.pagopa.mbd.service.client; +import static org.hibernate.validator.internal.util.Contracts.assertNotNull; +import static org.hibernate.validator.internal.util.Contracts.assertTrue; + import it.gov.pagopa.mbd.service.exception.WebClientException; import it.gov.pagopa.mbd.service.model.carts.GetCartRequest; import it.gov.pagopa.mbd.service.model.carts.GetCartResponse; From 3b2c8548e1014ae221bea9aa8cd083941cbc69f8 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:58:57 +0100 Subject: [PATCH 07/28] Update src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../java/it/gov/pagopa/mbd/service/client/ReactiveClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java index 8ac0861..2d98607 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java @@ -14,6 +14,7 @@ import it.gov.pagopa.mbd.service.model.xml.node.pafornode.PaSendRTV2Request; import it.gov.pagopa.mbd.service.model.xml.node.soap.envelope.Envelope; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; +import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; From 5eda1faa36dd1734c358c0936ebb63beab17a1e7 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:59:07 +0100 Subject: [PATCH 08/28] Update src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java index 6d66185..8df00a9 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java @@ -142,7 +142,8 @@ public Mono> handleConstraintException(ConstraintVio } @ExceptionHandler({WebClientException.class}) - public Mono> handleWebClientException(WebClientException ex, ServerWebExchange exchange) { + public Mono> handleWebClientException( + WebClientException ex, ServerWebExchange exchange) { log.warn("Validation Error raised:", ex); var errorResponse = ProblemJson.builder() From 6b7eee1b8f9d7fb1fe67176ac853a047651c15b5 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:59:15 +0100 Subject: [PATCH 09/28] Update src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../it/gov/pagopa/mbd/service/client/ReactiveClient.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java index 2d98607..2cde729 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java @@ -23,11 +23,6 @@ import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; -import java.util.List; - -import static org.hibernate.validator.internal.util.Contracts.assertNotNull; -import static org.hibernate.validator.internal.util.Contracts.assertTrue; - @Component public class ReactiveClient { From ad18f75d2c1447cd74b6a1101844e9acbda571e0 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:59:27 +0100 Subject: [PATCH 10/28] Update src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java index 8df00a9..ff47566 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java @@ -130,7 +130,8 @@ protected Mono> handleMethodArgumentNotValid(MethodArgume } @ExceptionHandler({ConstraintViolationException.class}) - public Mono> handleConstraintException(ConstraintViolationException ex, ServerWebExchange exchange) { + public Mono> handleConstraintException( + ConstraintViolationException ex, ServerWebExchange exchange) { log.warn("Validation Error raised:", ex); var errorResponse = ProblemJson.builder() From 06f684fd05c99d0cdd6f3cf8c1d328effd63504c Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:00:31 +0100 Subject: [PATCH 11/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xml/node/pafornode/PaSendRTV2Request.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java index d8ef11e..9dcb6a6 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -98,17 +98,14 @@ public String getIdBrokerPA() { return idBrokerPA; } - /** - * Imposta il valore della proprietà idBrokerPA. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdBrokerPA(String value) { - this.idBrokerPA = value; - } + /** + * Recupera il valore della proprietà idBrokerPA. + * + * @return possible object is {@link String } + */ + public String getIdBrokerPA() { + return idBrokerPA; + } /** * Recupera il valore della proprietà idStation. From 09bb415e8b43ee7853041aac69330d4f802ec741 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:00:52 +0100 Subject: [PATCH 12/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xml/node/pafornode/PaSendRTV2Request.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java index 9dcb6a6..88defca 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -86,17 +86,14 @@ public void setIdPA(String value) { this.idPA = value; } - /** - * Recupera il valore della proprietà idBrokerPA. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdBrokerPA() { - return idBrokerPA; - } + /** + * Imposta il valore della proprietà idPA. + * + * @param value allowed object is {@link String } + */ + public void setIdPA(String value) { + this.idPA = value; + } /** * Recupera il valore della proprietà idBrokerPA. From 0163408805facf9dd9071b873eb9ea419aa16d93 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:01:05 +0100 Subject: [PATCH 13/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/CtReceiptV2.java | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index f119dfb..abaaf35 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -67,36 +67,38 @@ * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctReceiptV2", propOrder = { - "receiptId", - "noticeNumber", - "fiscalCode", - "outcome", - "creditorReferenceId", - "paymentAmount", - "description", - "companyName", - "officeName", - "debtor", - "transferList", - "idPSP", - "pspFiscalCode", - "pspPartitaIVA", - "pspCompanyName", - "idChannel", - "channelDescription", - "payer", - "paymentMethod", - "paymentNote", - "fee", - "primaryCiIncurredFee", - "idBundle", - "idCiBundle", - "paymentDateTime", - "applicationDate", - "transferDate", - "metadata" -}) +@XmlType( + name = "ctReceiptV2", + propOrder = { + "receiptId", + "noticeNumber", + "fiscalCode", + "outcome", + "creditorReferenceId", + "paymentAmount", + "description", + "companyName", + "officeName", + "debtor", + "transferList", + "idPSP", + "pspFiscalCode", + "pspPartitaIVA", + "pspCompanyName", + "idChannel", + "channelDescription", + "payer", + "paymentMethod", + "paymentNote", + "fee", + "primaryCiIncurredFee", + "idBundle", + "idCiBundle", + "paymentDateTime", + "applicationDate", + "transferDate", + "metadata" + }) @AllArgsConstructor @NoArgsConstructor @Data From 38d84779be0d929069e5508b483e60e3df5e68c4 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:01:22 +0100 Subject: [PATCH 14/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../mbd/service/model/xml/node/pafornode/CtReceiptV2.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index abaaf35..de6f132 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -63,8 +63,6 @@ * </complexContent> * </complexType> * - * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType( From b9dd9889f3c163434eada9ca916951c9f0ca4e60 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:01:56 +0100 Subject: [PATCH 15/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xml/node/pafornode/CtEntityUniqueIdentifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java index 218a042..08db95a 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java @@ -1,8 +1,8 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // From 758d0fbc7ad6e09a59946b722c9ca5b64c1cdfb7 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:02:25 +0100 Subject: [PATCH 16/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/PaSendRTV2Request.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java index 88defca..470edc0 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -152,4 +152,12 @@ public void setReceipt(CtReceiptV2 value) { this.receipt = value; } + /** + * Imposta il valore della proprietà receipt. + * + * @param value allowed object is {@link CtReceiptV2 } + */ + public void setReceipt(CtReceiptV2 value) { + this.receipt = value; + } } From f6abda2667ecacac06c9ea0c903ee79740fd63e8 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:03:55 +0100 Subject: [PATCH 17/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xml/node/pafornode/PaSendRTV2Request.java | 76 ++++++++----------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java index 470edc0..c058369 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -104,53 +104,41 @@ public String getIdBrokerPA() { return idBrokerPA; } - /** - * Recupera il valore della proprietà idStation. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdStation() { - return idStation; - } + /** + * Recupera il valore della proprietà idStation. + * + * @return possible object is {@link String } + */ + public String getIdStation() { + return idStation; + } - /** - * Imposta il valore della proprietà idStation. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdStation(String value) { - this.idStation = value; - } + /** + * Imposta il valore della proprietà idStation. + * + * @param value allowed object is {@link String } + */ + public void setIdStation(String value) { + this.idStation = value; + } - /** - * Recupera il valore della proprietà receipt. - * - * @return - * possible object is - * {@link CtReceiptV2 } - * - */ - public CtReceiptV2 getReceipt() { - return receipt; - } + /** + * Recupera il valore della proprietà receipt. + * + * @return possible object is {@link CtReceiptV2 } + */ + public CtReceiptV2 getReceipt() { + return receipt; + } - /** - * Imposta il valore della proprietà receipt. - * - * @param value - * allowed object is - * {@link CtReceiptV2 } - * - */ - public void setReceipt(CtReceiptV2 value) { - this.receipt = value; - } + /** + * Imposta il valore della proprietà receipt. + * + * @param value allowed object is {@link CtReceiptV2 } + */ + public void setReceipt(CtReceiptV2 value) { + this.receipt = value; + } /** * Imposta il valore della proprietà receipt. From 8612de62e19ecb6fdd25d00871060ed2e26e32e2 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:04:27 +0100 Subject: [PATCH 18/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/CtEntityUniqueIdentifier.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java index 08db95a..295d774 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java @@ -5,7 +5,6 @@ // Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import jakarta.xml.bind.annotation.*; From 3ca4d5ac1a7f6be21ad3bd75bc32769b5f4ceb48 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:04:46 +0100 Subject: [PATCH 19/28] Update src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../pagopa/mbd/service/service/impl/MdbServiceImplTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java index 796a953..acaa596 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java @@ -16,6 +16,10 @@ import it.gov.pagopa.mbd.service.service.MbdService; import jakarta.inject.Inject; import jakarta.validation.ConstraintViolationException; +import java.math.BigDecimal; +import java.util.Collections; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.boot.test.context.SpringBootTest; From 80a58046cf9b2f84475ac94c99b45238445656c8 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:04:57 +0100 Subject: [PATCH 20/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/CtEntityUniqueIdentifier.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java index 295d774..d441397 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java @@ -9,7 +9,6 @@ import jakarta.xml.bind.annotation.*; - /** *

Classe Java per ctEntityUniqueIdentifier complex type. * From 1251eb99f21efcd5c330b94049ae2c86100c3902 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:21:00 +0100 Subject: [PATCH 21/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/CtReceiptV2.java | 564 ++++++++++++++++++ 1 file changed, 564 insertions(+) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index de6f132..6015ff2 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -822,4 +822,568 @@ public void setMetadata(CtMetadata value) { this.metadata = value; } + @XmlElement(required = true) + protected String fiscalCode; + + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StOutcome outcome; + + @XmlElement(required = true) + protected String creditorReferenceId; + + @XmlElement(required = true) + protected BigDecimal paymentAmount; + + @XmlElement(required = true) + protected String description; + + @XmlElement(required = true) + protected String companyName; + + protected String officeName; + + @XmlElement(required = true) + protected CtSubject debtor; + + @XmlElement(required = true) + protected CtTransferListPAReceiptV2 transferList; + + @XmlElement(required = true) + protected String idPSP; + + protected String pspFiscalCode; + protected String pspPartitaIVA; + + @XmlElement(name = "PSPCompanyName", required = true) + protected String pspCompanyName; + + @XmlElement(required = true) + protected String idChannel; + + @XmlElement(required = true) + protected String channelDescription; + + protected CtSubject payer; + protected String paymentMethod; + protected String paymentNote; + protected BigDecimal fee; + protected BigDecimal primaryCiIncurredFee; + protected String idBundle; + protected String idCiBundle; + + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar paymentDateTime; + + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar applicationDate; + + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar transferDate; + + protected CtMetadata metadata; + + /** + * Recupera il valore della proprietà receiptId. + * + * @return possible object is {@link String } + */ + public String getReceiptId() { + return receiptId; + } + + /** + * Imposta il valore della proprietà receiptId. + * + * @param value allowed object is {@link String } + */ + public void setReceiptId(String value) { + this.receiptId = value; + } + + /** + * Recupera il valore della proprietà noticeNumber. + * + * @return possible object is {@link String } + */ + public String getNoticeNumber() { + return noticeNumber; + } + + /** + * Imposta il valore della proprietà noticeNumber. + * + * @param value allowed object is {@link String } + */ + public void setNoticeNumber(String value) { + this.noticeNumber = value; + } + + /** + * Recupera il valore della proprietà fiscalCode. + * + * @return possible object is {@link String } + */ + public String getFiscalCode() { + return fiscalCode; + } + + /** + * Imposta il valore della proprietà fiscalCode. + * + * @param value allowed object is {@link String } + */ + public void setFiscalCode(String value) { + this.fiscalCode = value; + } + + /** + * Recupera il valore della proprietà outcome. + * + * @return possible object is {@link StOutcome } + */ + public StOutcome getOutcome() { + return outcome; + } + + /** + * Imposta il valore della proprietà outcome. + * + * @param value allowed object is {@link StOutcome } + */ + public void setOutcome(StOutcome value) { + this.outcome = value; + } + + /** + * Recupera il valore della proprietà creditorReferenceId. + * + * @return possible object is {@link String } + */ + public String getCreditorReferenceId() { + return creditorReferenceId; + } + + /** + * Imposta il valore della proprietà creditorReferenceId. + * + * @param value allowed object is {@link String } + */ + public void setCreditorReferenceId(String value) { + this.creditorReferenceId = value; + } + + /** + * Recupera il valore della proprietà paymentAmount. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + /** + * Imposta il valore della proprietà paymentAmount. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setPaymentAmount(BigDecimal value) { + this.paymentAmount = value; + } + + /** + * Recupera il valore della proprietà description. + * + * @return possible object is {@link String } + */ + public String getDescription() { + return description; + } + + /** + * Imposta il valore della proprietà description. + * + * @param value allowed object is {@link String } + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Recupera il valore della proprietà companyName. + * + * @return possible object is {@link String } + */ + public String getCompanyName() { + return companyName; + } + + /** + * Imposta il valore della proprietà companyName. + * + * @param value allowed object is {@link String } + */ + public void setCompanyName(String value) { + this.companyName = value; + } + + /** + * Recupera il valore della proprietà officeName. + * + * @return possible object is {@link String } + */ + public String getOfficeName() { + return officeName; + } + + /** + * Imposta il valore della proprietà officeName. + * + * @param value allowed object is {@link String } + */ + public void setOfficeName(String value) { + this.officeName = value; + } + + /** + * Recupera il valore della proprietà debtor. + * + * @return possible object is {@link CtSubject } + */ + public CtSubject getDebtor() { + return debtor; + } + + /** + * Imposta il valore della proprietà debtor. + * + * @param value allowed object is {@link CtSubject } + */ + public void setDebtor(CtSubject value) { + this.debtor = value; + } + + /** + * Recupera il valore della proprietà transferList. + * + * @return possible object is {@link CtTransferListPAReceiptV2 } + */ + public CtTransferListPAReceiptV2 getTransferList() { + return transferList; + } + + /** + * Imposta il valore della proprietà transferList. + * + * @param value allowed object is {@link CtTransferListPAReceiptV2 } + */ + public void setTransferList(CtTransferListPAReceiptV2 value) { + this.transferList = value; + } + + /** + * Recupera il valore della proprietà idPSP. + * + * @return possible object is {@link String } + */ + public String getIdPSP() { + return idPSP; + } + + /** + * Imposta il valore della proprietà idPSP. + * + * @param value allowed object is {@link String } + */ + public void setIdPSP(String value) { + this.idPSP = value; + } + + /** + * Recupera il valore della proprietà pspFiscalCode. + * + * @return possible object is {@link String } + */ + public String getPspFiscalCode() { + return pspFiscalCode; + } + + /** + * Imposta il valore della proprietà pspFiscalCode. + * + * @param value allowed object is {@link String } + */ + public void setPspFiscalCode(String value) { + this.pspFiscalCode = value; + } + + /** + * Recupera il valore della proprietà pspPartitaIVA. + * + * @return possible object is {@link String } + */ + public String getPspPartitaIVA() { + return pspPartitaIVA; + } + + /** + * Imposta il valore della proprietà pspPartitaIVA. + * + * @param value allowed object is {@link String } + */ + public void setPspPartitaIVA(String value) { + this.pspPartitaIVA = value; + } + + /** + * Recupera il valore della proprietà pspCompanyName. + * + * @return possible object is {@link String } + */ + public String getPSPCompanyName() { + return pspCompanyName; + } + + /** + * Imposta il valore della proprietà pspCompanyName. + * + * @param value allowed object is {@link String } + */ + public void setPSPCompanyName(String value) { + this.pspCompanyName = value; + } + + /** + * Recupera il valore della proprietà idChannel. + * + * @return possible object is {@link String } + */ + public String getIdChannel() { + return idChannel; + } + + /** + * Imposta il valore della proprietà idChannel. + * + * @param value allowed object is {@link String } + */ + public void setIdChannel(String value) { + this.idChannel = value; + } + + /** + * Recupera il valore della proprietà channelDescription. + * + * @return possible object is {@link String } + */ + public String getChannelDescription() { + return channelDescription; + } + + /** + * Imposta il valore della proprietà channelDescription. + * + * @param value allowed object is {@link String } + */ + public void setChannelDescription(String value) { + this.channelDescription = value; + } + + /** + * Recupera il valore della proprietà payer. + * + * @return possible object is {@link CtSubject } + */ + public CtSubject getPayer() { + return payer; + } + + /** + * Imposta il valore della proprietà payer. + * + * @param value allowed object is {@link CtSubject } + */ + public void setPayer(CtSubject value) { + this.payer = value; + } + + /** + * Recupera il valore della proprietà paymentMethod. + * + * @return possible object is {@link String } + */ + public String getPaymentMethod() { + return paymentMethod; + } + + /** + * Imposta il valore della proprietà paymentMethod. + * + * @param value allowed object is {@link String } + */ + public void setPaymentMethod(String value) { + this.paymentMethod = value; + } + + /** + * Recupera il valore della proprietà paymentNote. + * + * @return possible object is {@link String } + */ + public String getPaymentNote() { + return paymentNote; + } + + /** + * Imposta il valore della proprietà paymentNote. + * + * @param value allowed object is {@link String } + */ + public void setPaymentNote(String value) { + this.paymentNote = value; + } + + /** + * Recupera il valore della proprietà fee. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getFee() { + return fee; + } + + /** + * Imposta il valore della proprietà fee. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setFee(BigDecimal value) { + this.fee = value; + } + + /** + * Recupera il valore della proprietà primaryCiIncurredFee. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getPrimaryCiIncurredFee() { + return primaryCiIncurredFee; + } + + /** + * Imposta il valore della proprietà primaryCiIncurredFee. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setPrimaryCiIncurredFee(BigDecimal value) { + this.primaryCiIncurredFee = value; + } + + /** + * Recupera il valore della proprietà idBundle. + * + * @return possible object is {@link String } + */ + public String getIdBundle() { + return idBundle; + } + + /** + * Imposta il valore della proprietà idBundle. + * + * @param value allowed object is {@link String } + */ + public void setIdBundle(String value) { + this.idBundle = value; + } + + /** + * Recupera il valore della proprietà idCiBundle. + * + * @return possible object is {@link String } + */ + public String getIdCiBundle() { + return idCiBundle; + } + + /** + * Imposta il valore della proprietà idCiBundle. + * + * @param value allowed object is {@link String } + */ + public void setIdCiBundle(String value) { + this.idCiBundle = value; + } + + /** + * Recupera il valore della proprietà paymentDateTime. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getPaymentDateTime() { + return paymentDateTime; + } + + /** + * Imposta il valore della proprietà paymentDateTime. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setPaymentDateTime(XMLGregorianCalendar value) { + this.paymentDateTime = value; + } + + /** + * Recupera il valore della proprietà applicationDate. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getApplicationDate() { + return applicationDate; + } + + /** + * Imposta il valore della proprietà applicationDate. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setApplicationDate(XMLGregorianCalendar value) { + this.applicationDate = value; + } + + /** + * Recupera il valore della proprietà transferDate. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getTransferDate() { + return transferDate; + } + + /** + * Imposta il valore della proprietà transferDate. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setTransferDate(XMLGregorianCalendar value) { + this.transferDate = value; + } + + /** + * Recupera il valore della proprietà metadata. + * + * @return possible object is {@link CtMetadata } + */ + public CtMetadata getMetadata() { + return metadata; + } + + /** + * Imposta il valore della proprietà metadata. + * + * @param value allowed object is {@link CtMetadata } + */ + public void setMetadata(CtMetadata value) { + this.metadata = value; + } } From 2df2d5bb6f16dbcf917d637501e28e21af98b922 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:21:28 +0100 Subject: [PATCH 22/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../model/xml/node/pafornode/CtReceiptV2.java | 723 +----------------- 1 file changed, 5 insertions(+), 718 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index 6015ff2..ec477b9 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -103,724 +103,11 @@ @Builder public class CtReceiptV2 { - @XmlElement(required = true) - protected String receiptId; - @XmlElement(required = true) - protected String noticeNumber; - @XmlElement(required = true) - protected String fiscalCode; - @XmlElement(required = true) - @XmlSchemaType(name = "string") - protected StOutcome outcome; - @XmlElement(required = true) - protected String creditorReferenceId; - @XmlElement(required = true) - protected BigDecimal paymentAmount; - @XmlElement(required = true) - protected String description; - @XmlElement(required = true) - protected String companyName; - protected String officeName; - @XmlElement(required = true) - protected CtSubject debtor; - @XmlElement(required = true) - protected CtTransferListPAReceiptV2 transferList; - @XmlElement(required = true) - protected String idPSP; - protected String pspFiscalCode; - protected String pspPartitaIVA; - @XmlElement(name = "PSPCompanyName", required = true) - protected String pspCompanyName; - @XmlElement(required = true) - protected String idChannel; - @XmlElement(required = true) - protected String channelDescription; - protected CtSubject payer; - protected String paymentMethod; - protected String paymentNote; - protected BigDecimal fee; - protected BigDecimal primaryCiIncurredFee; - protected String idBundle; - protected String idCiBundle; - @XmlSchemaType(name = "dateTime") - protected XMLGregorianCalendar paymentDateTime; - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar applicationDate; - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar transferDate; - protected CtMetadata metadata; - - /** - * Recupera il valore della proprietà receiptId. - * - * @return - * possible object is - * {@link String } - * - */ - public String getReceiptId() { - return receiptId; - } - - /** - * Imposta il valore della proprietà receiptId. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setReceiptId(String value) { - this.receiptId = value; - } - - /** - * Recupera il valore della proprietà noticeNumber. - * - * @return - * possible object is - * {@link String } - * - */ - public String getNoticeNumber() { - return noticeNumber; - } - - /** - * Imposta il valore della proprietà noticeNumber. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setNoticeNumber(String value) { - this.noticeNumber = value; - } - - /** - * Recupera il valore della proprietà fiscalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFiscalCode() { - return fiscalCode; - } - - /** - * Imposta il valore della proprietà fiscalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFiscalCode(String value) { - this.fiscalCode = value; - } - - /** - * Recupera il valore della proprietà outcome. - * - * @return - * possible object is - * {@link StOutcome } - * - */ - public StOutcome getOutcome() { - return outcome; - } - - /** - * Imposta il valore della proprietà outcome. - * - * @param value - * allowed object is - * {@link StOutcome } - * - */ - public void setOutcome(StOutcome value) { - this.outcome = value; - } - - /** - * Recupera il valore della proprietà creditorReferenceId. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCreditorReferenceId() { - return creditorReferenceId; - } - - /** - * Imposta il valore della proprietà creditorReferenceId. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCreditorReferenceId(String value) { - this.creditorReferenceId = value; - } - - /** - * Recupera il valore della proprietà paymentAmount. - * - * @return - * possible object is - * {@link BigDecimal } - * - */ - public BigDecimal getPaymentAmount() { - return paymentAmount; - } - - /** - * Imposta il valore della proprietà paymentAmount. - * - * @param value - * allowed object is - * {@link BigDecimal } - * - */ - public void setPaymentAmount(BigDecimal value) { - this.paymentAmount = value; - } - - /** - * Recupera il valore della proprietà description. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Imposta il valore della proprietà description. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Recupera il valore della proprietà companyName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCompanyName() { - return companyName; - } - - /** - * Imposta il valore della proprietà companyName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCompanyName(String value) { - this.companyName = value; - } - - /** - * Recupera il valore della proprietà officeName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOfficeName() { - return officeName; - } - - /** - * Imposta il valore della proprietà officeName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOfficeName(String value) { - this.officeName = value; - } - - /** - * Recupera il valore della proprietà debtor. - * - * @return - * possible object is - * {@link CtSubject } - * - */ - public CtSubject getDebtor() { - return debtor; - } - - /** - * Imposta il valore della proprietà debtor. - * - * @param value - * allowed object is - * {@link CtSubject } - * - */ - public void setDebtor(CtSubject value) { - this.debtor = value; - } - - /** - * Recupera il valore della proprietà transferList. - * - * @return - * possible object is - * {@link CtTransferListPAReceiptV2 } - * - */ - public CtTransferListPAReceiptV2 getTransferList() { - return transferList; - } - - /** - * Imposta il valore della proprietà transferList. - * - * @param value - * allowed object is - * {@link CtTransferListPAReceiptV2 } - * - */ - public void setTransferList(CtTransferListPAReceiptV2 value) { - this.transferList = value; - } - - /** - * Recupera il valore della proprietà idPSP. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdPSP() { - return idPSP; - } - - /** - * Imposta il valore della proprietà idPSP. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdPSP(String value) { - this.idPSP = value; - } - - /** - * Recupera il valore della proprietà pspFiscalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPspFiscalCode() { - return pspFiscalCode; - } - - /** - * Imposta il valore della proprietà pspFiscalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPspFiscalCode(String value) { - this.pspFiscalCode = value; - } - - /** - * Recupera il valore della proprietà pspPartitaIVA. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPspPartitaIVA() { - return pspPartitaIVA; - } - - /** - * Imposta il valore della proprietà pspPartitaIVA. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPspPartitaIVA(String value) { - this.pspPartitaIVA = value; - } - - /** - * Recupera il valore della proprietà pspCompanyName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPSPCompanyName() { - return pspCompanyName; - } - - /** - * Imposta il valore della proprietà pspCompanyName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPSPCompanyName(String value) { - this.pspCompanyName = value; - } - - /** - * Recupera il valore della proprietà idChannel. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdChannel() { - return idChannel; - } - - /** - * Imposta il valore della proprietà idChannel. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdChannel(String value) { - this.idChannel = value; - } - - /** - * Recupera il valore della proprietà channelDescription. - * - * @return - * possible object is - * {@link String } - * - */ - public String getChannelDescription() { - return channelDescription; - } - - /** - * Imposta il valore della proprietà channelDescription. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setChannelDescription(String value) { - this.channelDescription = value; - } - - /** - * Recupera il valore della proprietà payer. - * - * @return - * possible object is - * {@link CtSubject } - * - */ - public CtSubject getPayer() { - return payer; - } - - /** - * Imposta il valore della proprietà payer. - * - * @param value - * allowed object is - * {@link CtSubject } - * - */ - public void setPayer(CtSubject value) { - this.payer = value; - } - - /** - * Recupera il valore della proprietà paymentMethod. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPaymentMethod() { - return paymentMethod; - } - - /** - * Imposta il valore della proprietà paymentMethod. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPaymentMethod(String value) { - this.paymentMethod = value; - } - - /** - * Recupera il valore della proprietà paymentNote. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPaymentNote() { - return paymentNote; - } - - /** - * Imposta il valore della proprietà paymentNote. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPaymentNote(String value) { - this.paymentNote = value; - } - - /** - * Recupera il valore della proprietà fee. - * - * @return - * possible object is - * {@link BigDecimal } - * - */ - public BigDecimal getFee() { - return fee; - } - - /** - * Imposta il valore della proprietà fee. - * - * @param value - * allowed object is - * {@link BigDecimal } - * - */ - public void setFee(BigDecimal value) { - this.fee = value; - } - - /** - * Recupera il valore della proprietà primaryCiIncurredFee. - * - * @return - * possible object is - * {@link BigDecimal } - * - */ - public BigDecimal getPrimaryCiIncurredFee() { - return primaryCiIncurredFee; - } - - /** - * Imposta il valore della proprietà primaryCiIncurredFee. - * - * @param value - * allowed object is - * {@link BigDecimal } - * - */ - public void setPrimaryCiIncurredFee(BigDecimal value) { - this.primaryCiIncurredFee = value; - } - - /** - * Recupera il valore della proprietà idBundle. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdBundle() { - return idBundle; - } - - /** - * Imposta il valore della proprietà idBundle. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdBundle(String value) { - this.idBundle = value; - } - - /** - * Recupera il valore della proprietà idCiBundle. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdCiBundle() { - return idCiBundle; - } - - /** - * Imposta il valore della proprietà idCiBundle. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdCiBundle(String value) { - this.idCiBundle = value; - } - - /** - * Recupera il valore della proprietà paymentDateTime. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getPaymentDateTime() { - return paymentDateTime; - } - - /** - * Imposta il valore della proprietà paymentDateTime. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setPaymentDateTime(XMLGregorianCalendar value) { - this.paymentDateTime = value; - } - - /** - * Recupera il valore della proprietà applicationDate. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getApplicationDate() { - return applicationDate; - } - - /** - * Imposta il valore della proprietà applicationDate. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setApplicationDate(XMLGregorianCalendar value) { - this.applicationDate = value; - } - - /** - * Recupera il valore della proprietà transferDate. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getTransferDate() { - return transferDate; - } - - /** - * Imposta il valore della proprietà transferDate. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setTransferDate(XMLGregorianCalendar value) { - this.transferDate = value; - } - - /** - * Recupera il valore della proprietà metadata. - * - * @return - * possible object is - * {@link CtMetadata } - * - */ - public CtMetadata getMetadata() { - return metadata; - } - - /** - * Imposta il valore della proprietà metadata. - * - * @param value - * allowed object is - * {@link CtMetadata } - * - */ - public void setMetadata(CtMetadata value) { - this.metadata = value; - } + @XmlElement(required = true) + protected String receiptId; + + @XmlElement(required = true) + protected String noticeNumber; @XmlElement(required = true) protected String fiscalCode; From f981d7aa3244e38f8a78604df4c3746911951b95 Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:21:43 +0100 Subject: [PATCH 23/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../mbd/service/model/xml/node/pafornode/CtReceiptV2.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index ec477b9..f08048e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -11,6 +11,8 @@ import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtMetadata; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; import jakarta.xml.bind.annotation.*; +import java.math.BigDecimal; +import javax.xml.datatype.XMLGregorianCalendar; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; From ed7755b35a45f33e41258568d12752bb9d3ad9af Mon Sep 17 00:00:00 2001 From: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:22:01 +0100 Subject: [PATCH 24/28] Update src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../mbd/service/model/xml/node/pafornode/CtReceiptV2.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index f08048e..c9005f9 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -18,10 +18,6 @@ import lombok.Data; import lombok.NoArgsConstructor; -import javax.xml.datatype.XMLGregorianCalendar; -import java.math.BigDecimal; - - /** *

Classe Java per ctReceiptV2 complex type. * From 3803213a9caaff9f9b9ea29b563e86fb6df73bf9 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Wed, 18 Dec 2024 13:23:30 +0000 Subject: [PATCH 25/28] Bump to version 1.2.1 [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 711 ++++++++++++++++++++++-------------------- pom.xml | 2 +- 6 files changed, 381 insertions(+), 342 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 6e02f26..33d354f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-mbd-service description: Microservice that handles services for eBollo type: application -version: 0.99.0 -appVersion: 1.2.0 +version: 0.100.0 +appVersion: 1.2.1 dependencies: - name: microservice-chart version: 7.1.1 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 0cc9c26..a7e73ad 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.0" + tag: "1.2.1" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index ac2b293..0766e22 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.0" + tag: "1.2.1" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 28442c7..ebd1890 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.0" + tag: "1.2.1" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/openapi/openapi.json b/openapi/openapi.json index d321e4f..7940295 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,493 +1,532 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "mbd-service", - "description" : "MBD Service", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "1.2.0" + "openapi": "3.0.1", + "info": { + "title": "mbd-service", + "description": "MBD Service", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "1.2.1" }, - "servers" : [ { - "url" : "", - "description" : "Generated server url" - } ], - "paths" : { - "/info" : { - "get" : { - "tags" : [ "Home" ], - "summary" : "health check", - "description" : "Return OK if application is started", - "operationId" : "healthCheck", - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "servers": [ + { + "url": "", + "description": "Generated server url" + } + ], + "paths": { + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/AppInfo" + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AppInfo" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] }, - "/organizations/{fiscalCodeEC}/mbd" : { - "post" : { - "tags" : [ "mbd-controller" ], - "summary" : "getMbd", - "description" : "Return mbd data for payment on requirement ", - "operationId" : "getMdb", - "parameters" : [ { - "name" : "fiscalCodeEC", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/organizations/{fiscalCodeEC}/mbd": { + "post": { + "tags": [ + "mbd-controller" + ], + "summary": "getMbd", + "description": "Return mbd data for payment on requirement ", + "operationId": "getMdb", + "parameters": [ + { + "name": "fiscalCodeEC", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetMbdRequest" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMbdRequest" } } }, - "required" : true + "required": true }, - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetCartResponse" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCartResponse" } } } }, - "400" : { - "description" : "Bad Request", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Forbidden", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "ibans for the brokerCode not found", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "404": { + "description": "ibans for the brokerCode not found", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "429" : { - "description" : "Too many requests", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "500" : { - "description" : "Service unavailable", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetCartErrorResponse" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCartErrorResponse" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] }, - "/organizations/{fiscalCode}/receipt/{nav}" : { - "get" : { - "tags" : [ "mbd-controller" ], - "summary" : "getPaymentReceipt", - "description" : "Return receipt of payment on requirement ", - "operationId" : "getPaymentReceipts", - "parameters" : [ { - "name" : "fiscalCode", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "nav", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/organizations/{fiscalCode}/receipt/{nav}": { + "get": { + "tags": [ + "mbd-controller" + ], + "summary": "getPaymentReceipt", + "description": "Return receipt of payment on requirement ", + "operationId": "getPaymentReceipts", + "parameters": [ + { + "name": "fiscalCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nav", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetMdbReceipt" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMdbReceipt" } } } }, - "400" : { - "description" : "Bad Request", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Unauthorized", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "403" : { - "description" : "Forbidden", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "ibans for the brokerCode not found", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "404": { + "description": "ibans for the brokerCode not found", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "429" : { - "description" : "Too many requests", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } } }, - "500" : { - "description" : "Service unavailable", - "headers" : { - "X-Request-Id" : { - "description" : "This header identifies the call", - "schema" : { - "type" : "string" + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] }, - "parameters" : [ { - "name" : "X-Request-Id", - "in" : "header", - "description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema" : { - "type" : "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } ] + ] } }, - "components" : { - "schemas" : { - "GetMbdRequest" : { - "required" : [ "idCIService", "returnUrls" ], - "type" : "object", - "properties" : { - "paymentNotices" : { - "maxItems" : 1, - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentNotice" + "components": { + "schemas": { + "GetMbdRequest": { + "required": [ + "idCIService", + "returnUrls" + ], + "type": "object", + "properties": { + "paymentNotices": { + "maxItems": 1, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentNotice" } }, - "idCIService" : { - "type" : "string" + "idCIService": { + "type": "string" }, - "returnUrls" : { - "$ref" : "#/components/schemas/ReturnUrls" + "returnUrls": { + "$ref": "#/components/schemas/ReturnUrls" } } }, - "PaymentNotice" : { - "required" : [ "amount", "email", "firstName", "fiscalCode", "lastName", "province" ], - "type" : "object", - "properties" : { - "firstName" : { - "type" : "string" + "PaymentNotice": { + "required": [ + "amount", + "email", + "firstName", + "fiscalCode", + "lastName", + "province" + ], + "type": "object", + "properties": { + "firstName": { + "type": "string" }, - "lastName" : { - "type" : "string" + "lastName": { + "type": "string" }, - "fiscalCode" : { - "type" : "string" + "fiscalCode": { + "type": "string" }, - "email" : { - "type" : "string" + "email": { + "type": "string" }, - "amount" : { - "type" : "integer", - "format" : "int64" + "amount": { + "type": "integer", + "format": "int64" }, - "province" : { - "type" : "string" + "province": { + "type": "string" }, - "documentHash" : { - "maxLength" : 44, - "minLength" : 44, - "type" : "string" + "documentHash": { + "maxLength": 44, + "minLength": 44, + "type": "string" } } }, - "ReturnUrls" : { - "required" : [ "cancelUrl", "errorUrl", "successUrl" ], - "type" : "object", - "properties" : { - "successUrl" : { - "type" : "string" + "ReturnUrls": { + "required": [ + "cancelUrl", + "errorUrl", + "successUrl" + ], + "type": "object", + "properties": { + "successUrl": { + "type": "string" }, - "cancelUrl" : { - "type" : "string" + "cancelUrl": { + "type": "string" }, - "errorUrl" : { - "type" : "string" + "errorUrl": { + "type": "string" } } }, - "ProblemJson" : { - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + "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 + "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" + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" } } }, - "GetCartResponse" : { - "type" : "object", - "properties" : { - "checkoutRedirectUrl" : { - "type" : "string" + "GetCartResponse": { + "type": "object", + "properties": { + "checkoutRedirectUrl": { + "type": "string" }, - "navDownloadLink" : { - "type" : "string" + "navDownloadLink": { + "type": "string" }, - "mbdNav" : { - "type" : "string" + "mbdNav": { + "type": "string" } } }, - "GetCartErrorResponse" : { - "type" : "object", - "properties" : { - "errorUrl" : { - "type" : "string" + "GetCartErrorResponse": { + "type": "object", + "properties": { + "errorUrl": { + "type": "string" } } }, - "GetMdbReceipt" : { - "type" : "object", - "properties" : { - "content" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "byte" + "GetMdbReceipt": { + "type": "object", + "properties": { + "content": { + "type": "array", + "items": { + "type": "string", + "format": "byte" } } } }, - "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 2deeea0..eb8e368 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.ebollo mbd-service - 1.2.0 + 1.2.1 MBD Service MBD Service From ef58c6d5c687a86032f42636dd28e2be0f4cb86c Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Wed, 18 Dec 2024 13:30:18 +0000 Subject: [PATCH 26/28] Bump to version 1.2.2 [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 33d354f..4569a1a 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-mbd-service description: Microservice that handles services for eBollo type: application -version: 0.100.0 -appVersion: 1.2.1 +version: 0.101.0 +appVersion: 1.2.2 dependencies: - name: microservice-chart version: 7.1.1 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index a7e73ad..17f458e 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.1" + tag: "1.2.2" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 0766e22..46182a0 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.1" + tag: "1.2.2" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index ebd1890..7313ffb 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.1" + tag: "1.2.2" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/openapi/openapi.json b/openapi/openapi.json index 7940295..44ff12f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "mbd-service", "description": "MBD Service", "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.2.1" + "version": "1.2.2" }, "servers": [ { diff --git a/pom.xml b/pom.xml index eb8e368..aac89b5 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.ebollo mbd-service - 1.2.1 + 1.2.2 MBD Service MBD Service From bf34458cfd26f1e23a771a2dcb1b57b79a88d1d3 Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Wed, 18 Dec 2024 14:51:42 +0100 Subject: [PATCH 27/28] fix: google format --- .../gov/pagopa/mbd/service/Application.java | 1 - .../mbd/service/client/ClientDataConfig.java | 25 +- .../mbd/service/client/ReactiveClient.java | 201 ++++---- .../mbd/service/config/CorsConfiguration.java | 24 +- .../mbd/service/config/LoggingAspect.java | 18 +- .../mbd/service/config/MarshalerConfig.java | 13 +- .../mbd/service/config/OpenApiConfig.java | 1 - .../mbd/service/config/RequestFilter.java | 12 +- .../mbd/service/config/ResponseValidator.java | 3 +- .../config/WebClientConfiguration.java | 41 +- .../service/controller/HomeController.java | 10 +- .../mbd/service/controller/MbdController.java | 204 +++++--- .../mbd/service/exception/AppError.java | 25 +- .../mbd/service/exception/AppException.java | 3 +- .../exception/CartMappingException.java | 8 +- .../mbd/service/exception/ErrorHandler.java | 56 ++- .../service/exception/WebClientException.java | 8 +- .../mbd/service/mapper/RequestMapper.java | 171 ++++--- .../model/carts/CartPaymentNotice.java | 11 +- .../model/carts/GetCartErrorResponse.java | 3 +- .../service/model/carts/GetCartRequest.java | 13 +- .../service/model/carts/GetCartResponse.java | 7 +- .../mbd/service/model/carts/ReturnUrls.java | 7 +- .../mbd/service/model/mdb/GetMbdRequest.java | 16 +- .../mbd/service/model/mdb/GetMdbReceipt.java | 3 +- .../mbd/service/model/mdb/PaymentNotice.java | 23 +- .../mbd/service/model/mdb/ReturnUrls.java | 10 +- .../xml/node/marcaDaBollo/CtService.java | 367 +++++++------- .../xml/node/marcaDaBollo/ObjectFactory.java | 86 ++-- .../xml/node/marcaDaBollo/package-info.java | 12 +- .../CtPaymentOptionDescription.java | 201 ++++---- .../CtPaymentOptionsDescriptionList.java | 81 ++-- .../model/xml/node/nodeforpsp/CtQrCode.java | 109 ++--- .../DemandPaymentNoticeRequest.java | 316 ++++++------ .../DemandPaymentNoticeResponse.java | 307 ++++++------ .../model/xml/node/nodeforpsp/Detail.java | 115 ++--- .../model/xml/node/nodeforpsp/FaultBean.java | 402 +++++++--------- .../xml/node/nodeforpsp/ObjectFactory.java | 191 ++++---- .../node/nodeforpsp/StAmountOptionPSP.java | 42 +- .../xml/node/nodeforpsp/package-info.java | 11 +- .../pafornode/CtEntityUniqueIdentifier.java | 101 ++-- .../model/xml/node/pafornode/CtReceiptV2.java | 15 +- .../model/xml/node/pafornode/CtSubject.java | 448 ++++++++---------- .../pafornode/CtTransferListPAReceiptV2.java | 81 ++-- .../node/pafornode/CtTransferPAReceiptV2.java | 444 ++++++++--------- .../xml/node/pafornode/ObjectFactory.java | 120 ++--- .../xml/node/pafornode/PaSendRTV2Request.java | 84 ++-- .../StEntityUniqueIdentifierType.java | 34 +- .../xml/node/pafornode/package-info.java | 11 +- .../model/xml/node/soap/envelope/Body.java | 36 +- .../model/xml/node/soap/envelope/Detail.java | 115 ++--- .../xml/node/soap/envelope/Envelope.java | 60 ++- .../model/xml/node/soap/envelope/Fault.java | 214 ++++----- .../model/xml/node/soap/envelope/Header.java | 115 ++--- .../xml/node/soap/envelope/ObjectFactory.java | 217 ++++----- .../xml/node/soap/envelope/package-info.java | 8 +- .../xsd/common_types/v1_0/CtFaultBean.java | 402 +++++++--------- .../xml/xsd/common_types/v1_0/CtMapEntry.java | 109 ++--- .../xml/xsd/common_types/v1_0/CtMetadata.java | 80 ++-- .../xml/xsd/common_types/v1_0/CtResponse.java | 117 ++--- .../v1_0/CtRichiestaMarcaDaBollo.java | 151 +++--- .../xml/xsd/common_types/v1_0/CtRisposta.java | 69 ++- .../xsd/common_types/v1_0/ObjectFactory.java | 120 ++--- .../xml/xsd/common_types/v1_0/StOutcome.java | 34 +- .../xsd/common_types/v1_0/package-info.java | 11 +- .../mbd/service/service/MbdService.java | 5 +- .../service/service/impl/MbdServiceImpl.java | 228 +++++---- .../mbd/service/OpenApiGenerationTest.java | 55 ++- .../service/client/ReactiveClientTest.java | 346 ++++++++------ .../controller/HomeControllerTest.java | 21 +- .../service/controller/MbdControllerTest.java | 164 ++++--- .../service/impl/MdbServiceImplTest.java | 342 ++++++------- 72 files changed, 3485 insertions(+), 4029 deletions(-) diff --git a/src/main/java/it/gov/pagopa/mbd/service/Application.java b/src/main/java/it/gov/pagopa/mbd/service/Application.java index ec71f7e..543fdb4 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/Application.java +++ b/src/main/java/it/gov/pagopa/mbd/service/Application.java @@ -13,5 +13,4 @@ public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } - } diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ClientDataConfig.java b/src/main/java/it/gov/pagopa/mbd/service/client/ClientDataConfig.java index 8a45159..534d4ef 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ClientDataConfig.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ClientDataConfig.java @@ -8,22 +8,21 @@ @Data public class ClientDataConfig { - @Value("${mbd.client.demandPayment.endpoint}") - private String demandPaymentEndpoint; + @Value("${mbd.client.demandPayment.endpoint}") + private String demandPaymentEndpoint; - @Value("${mbd.client.cart.endpoint}") - private String getCartEndpoint; + @Value("${mbd.client.cart.endpoint}") + private String getCartEndpoint; - @Value("${mbd.client.paymentReceipt.endpoint}") - private String getPaymentReceiptEndpoint; + @Value("${mbd.client.paymentReceipt.endpoint}") + private String getPaymentReceiptEndpoint; - @Value("${mbd.client.demandPayment.subscriptionKey}") - private String demandPaymentSubscriptionKey; + @Value("${mbd.client.demandPayment.subscriptionKey}") + private String demandPaymentSubscriptionKey; - @Value("${mbd.client.cart.subscriptionKey}") - private String getCartSubscriptionKey; - - @Value("${mbd.client.paymentReceipt.subscriptionKey}") - private String getPaymentReceiptSubscriptionKey; + @Value("${mbd.client.cart.subscriptionKey}") + private String getCartSubscriptionKey; + @Value("${mbd.client.paymentReceipt.subscriptionKey}") + private String getPaymentReceiptSubscriptionKey; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java index 2cde729..c9d5507 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java +++ b/src/main/java/it/gov/pagopa/mbd/service/client/ReactiveClient.java @@ -26,91 +26,118 @@ @Component public class ReactiveClient { - private final WebClient webClient; - - private final ClientDataConfig clientDataConfig; - - private final String OCP_SUBSCRIPTION_KEY = "ocp-apim-subscription-key"; - - - @Autowired - public ReactiveClient(WebClient webClient, ClientDataConfig clientDataConfig) { - this.webClient = webClient; - this.clientDataConfig = clientDataConfig; - } - - public Mono demandPaymentNotice(DemandPaymentNoticeRequest demandPaymentNoticeRequest) { - - return webClient.post() - .uri(clientDataConfig.getDemandPaymentEndpoint()) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML_VALUE) - .header("soapaction", "demandPaymentNotice") - .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getDemandPaymentSubscriptionKey()) - .bodyValue("\n" + - "\n" + - " \n" + - " \n" + - " "+demandPaymentNoticeRequest.getIdPSP()+"\n" + - " "+demandPaymentNoticeRequest.getIdBrokerPSP()+"\n" + - " "+demandPaymentNoticeRequest.getIdChannel()+"\n" + - " "+demandPaymentNoticeRequest.getIdSoggettoServizio()+"\n" + - " "+new String(demandPaymentNoticeRequest.getDatiSpecificiServizio())+"\n" + - " \n" + - " \n" + - "") - .retrieve() - .bodyToMono(Envelope.class).map(item -> { - if (item.getBody() == null || item.getBody().getDemandPaymentNoticeResponse() == null || - StOutcome.KO.equals(item.getBody().getDemandPaymentNoticeResponse().getOutcome())) { - throw new RuntimeException("Encountered KO while calling demandPayment " + - (item.getBody() != null && item.getBody().getDemandPaymentNoticeResponse() != null && - item.getBody().getDemandPaymentNoticeResponse().getFault() != null ? - item.getBody().getDemandPaymentNoticeResponse().getFault().getFaultCode() + " - " - + item.getBody().getDemandPaymentNoticeResponse().getFault().getDescription() : "") - ); - } - return item.getBody().getDemandPaymentNoticeResponse(); - }).onErrorMap(e -> new WebClientException(e.getMessage(), e)); - - } - - public Mono getCart(GetCartRequest getCartRequest) { - - return webClient.post() - .uri(clientDataConfig.getGetCartEndpoint()) - .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getGetCartSubscriptionKey()) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) - .body(Mono.just(getCartRequest), GetCartRequest.class) - .retrieve() - .bodyToMono(GetCartResponse.class) - .onErrorMap(e -> new WebClientException(e.getMessage(), e)); - - } - - public Mono getPaymentReceipt(String fiscalCode, String iuv) { - - return webClient.get() - .uri(String.format(clientDataConfig.getGetPaymentReceiptEndpoint(), fiscalCode, iuv)) - .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getGetPaymentReceiptSubscriptionKey()) - .retrieve() - .bodyToMono(PaSendRTV2Request.class).map( - item -> { - assertNotNull(item); - CtReceiptV2 ctReceiptV2 = item.getReceipt(); - assertNotNull(ctReceiptV2); - CtTransferListPAReceiptV2 ctTransferListPAReceiptV2 = ctReceiptV2.getTransferList(); - assertNotNull(ctTransferListPAReceiptV2); - List ctTransferPAReceiptV2 = ctTransferListPAReceiptV2.getTransfer(); - assertTrue(!ctTransferPAReceiptV2.isEmpty(), "Missing ctTransferPAReceiptV2"); - assertNotNull(ctTransferPAReceiptV2.get(0).getMBDAttachment()); - return item; - } - ) - .onErrorMap(IllegalArgumentException.class, e -> e) - .onErrorMap(WebClientResponseException.class, e -> new WebClientException(e.getMessage(), e)); - - } - + private final WebClient webClient; + + private final ClientDataConfig clientDataConfig; + + private final String OCP_SUBSCRIPTION_KEY = "ocp-apim-subscription-key"; + + @Autowired + public ReactiveClient(WebClient webClient, ClientDataConfig clientDataConfig) { + this.webClient = webClient; + this.clientDataConfig = clientDataConfig; + } + + public Mono demandPaymentNotice( + DemandPaymentNoticeRequest demandPaymentNoticeRequest) { + + return webClient + .post() + .uri(clientDataConfig.getDemandPaymentEndpoint()) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML_VALUE) + .header("soapaction", "demandPaymentNotice") + .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getDemandPaymentSubscriptionKey()) + .bodyValue( + "\n" + + "\n" + + " \n" + + " \n" + + " " + + demandPaymentNoticeRequest.getIdPSP() + + "\n" + + " " + + demandPaymentNoticeRequest.getIdBrokerPSP() + + "\n" + + " " + + demandPaymentNoticeRequest.getIdChannel() + + "\n" + + " " + + demandPaymentNoticeRequest.getIdSoggettoServizio() + + "\n" + + " " + + new String(demandPaymentNoticeRequest.getDatiSpecificiServizio()) + + "\n" + + " \n" + + " \n" + + "") + .retrieve() + .bodyToMono(Envelope.class) + .map( + item -> { + if (item.getBody() == null + || item.getBody().getDemandPaymentNoticeResponse() == null + || StOutcome.KO.equals( + item.getBody().getDemandPaymentNoticeResponse().getOutcome())) { + throw new RuntimeException( + "Encountered KO while calling demandPayment " + + (item.getBody() != null + && item.getBody().getDemandPaymentNoticeResponse() != null + && item.getBody().getDemandPaymentNoticeResponse().getFault() + != null + ? item.getBody() + .getDemandPaymentNoticeResponse() + .getFault() + .getFaultCode() + + " - " + + item.getBody() + .getDemandPaymentNoticeResponse() + .getFault() + .getDescription() + : "")); + } + return item.getBody().getDemandPaymentNoticeResponse(); + }) + .onErrorMap(e -> new WebClientException(e.getMessage(), e)); + } + + public Mono getCart(GetCartRequest getCartRequest) { + + return webClient + .post() + .uri(clientDataConfig.getGetCartEndpoint()) + .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getGetCartSubscriptionKey()) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .body(Mono.just(getCartRequest), GetCartRequest.class) + .retrieve() + .bodyToMono(GetCartResponse.class) + .onErrorMap(e -> new WebClientException(e.getMessage(), e)); + } + + public Mono getPaymentReceipt(String fiscalCode, String iuv) { + + return webClient + .get() + .uri(String.format(clientDataConfig.getGetPaymentReceiptEndpoint(), fiscalCode, iuv)) + .header(OCP_SUBSCRIPTION_KEY, clientDataConfig.getGetPaymentReceiptSubscriptionKey()) + .retrieve() + .bodyToMono(PaSendRTV2Request.class) + .map( + item -> { + assertNotNull(item); + CtReceiptV2 ctReceiptV2 = item.getReceipt(); + assertNotNull(ctReceiptV2); + CtTransferListPAReceiptV2 ctTransferListPAReceiptV2 = ctReceiptV2.getTransferList(); + assertNotNull(ctTransferListPAReceiptV2); + List ctTransferPAReceiptV2 = + ctTransferListPAReceiptV2.getTransfer(); + assertTrue(!ctTransferPAReceiptV2.isEmpty(), "Missing ctTransferPAReceiptV2"); + assertNotNull(ctTransferPAReceiptV2.get(0).getMBDAttachment()); + return item; + }) + .onErrorMap(IllegalArgumentException.class, e -> e) + .onErrorMap( + WebClientResponseException.class, e -> new WebClientException(e.getMessage(), e)); + } } - - diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/CorsConfiguration.java b/src/main/java/it/gov/pagopa/mbd/service/config/CorsConfiguration.java index 54e1b20..4cad3d6 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/CorsConfiguration.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/CorsConfiguration.java @@ -11,17 +11,17 @@ @Configuration public class CorsConfiguration implements WebFluxConfigurer { - @Value("${cors.configuration}") - private String corsConfiguration; - - @Override - @SneakyThrows - public void addCorsMappings(CorsRegistry registry) { - AppCorsConfiguration appCorsConfiguration = new ObjectMapper().readValue(corsConfiguration, - AppCorsConfiguration.class); - registry.addMapping("/**") - .allowedOrigins(appCorsConfiguration.getOrigins()) - .allowedMethods(appCorsConfiguration.getMethods()); - } + @Value("${cors.configuration}") + private String corsConfiguration; + @Override + @SneakyThrows + public void addCorsMappings(CorsRegistry registry) { + AppCorsConfiguration appCorsConfiguration = + new ObjectMapper().readValue(corsConfiguration, AppCorsConfiguration.class); + registry + .addMapping("/**") + .allowedOrigins(appCorsConfiguration.getOrigins()) + .allowedMethods(appCorsConfiguration.getMethods()); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/LoggingAspect.java b/src/main/java/it/gov/pagopa/mbd/service/config/LoggingAspect.java index f05580d..53d8da0 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/LoggingAspect.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/LoggingAspect.java @@ -1,17 +1,14 @@ package it.gov.pagopa.mbd.service.config; -import static it.gov.pagopa.mbd.service.util.CommonUtility.deNull; - import it.gov.pagopa.mbd.service.exception.AppError; import it.gov.pagopa.mbd.service.model.ProblemJson; import it.gov.pagopa.mbd.service.util.CommonUtility; - +import jakarta.annotation.PostConstruct; +// import jakarta.servlet.http.HttpServletRequest; +// import jakarta.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import jakarta.annotation.PostConstruct; -//import jakarta.servlet.http.HttpServletRequest; -//import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; @@ -21,7 +18,6 @@ import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.CodeSignature; import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; @@ -42,9 +38,9 @@ public class LoggingAspect { public static final String OPERATION_ID = "operationId"; public static final String ARGS = "args"; -// @Autowired HttpServletRequest httRequest; -// -// @Autowired HttpServletResponse httpResponse; + // @Autowired HttpServletRequest httRequest; + // + // @Autowired HttpServletResponse httpResponse; @Value("${info.application.name}") private String name; @@ -125,7 +121,7 @@ public Object logApiInvocation(ProceedingJoinPoint joinPoint) throws Throwable { Object result = joinPoint.proceed(); MDC.put(STATUS, "OK"); - //MDC.put(CODE, String.valueOf(httpResponse.getStatus())); + // MDC.put(CODE, String.valueOf(httpResponse.getStatus())); MDC.put(RESPONSE_TIME, getExecutionTime()); log.info( "Successful API operation {} - result: {}", joinPoint.getSignature().getName(), result); diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/MarshalerConfig.java b/src/main/java/it/gov/pagopa/mbd/service/config/MarshalerConfig.java index 86047e0..d8c256a 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/MarshalerConfig.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/MarshalerConfig.java @@ -7,11 +7,10 @@ @Configuration public class MarshalerConfig { - @Bean - public Jaxb2Marshaller marshaler() { - Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); - jaxb2Marshaller.setPackagesToScan("it.gov.pagopa.mbd.service.model.xml.node.marcaDaBollo"); - return jaxb2Marshaller; - } - + @Bean + public Jaxb2Marshaller marshaler() { + Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); + jaxb2Marshaller.setPackagesToScan("it.gov.pagopa.mbd.service.model.xml.node.marcaDaBollo"); + return jaxb2Marshaller; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/OpenApiConfig.java b/src/main/java/it/gov/pagopa/mbd/service/config/OpenApiConfig.java index ed04fa7..18722bf 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/OpenApiConfig.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/OpenApiConfig.java @@ -2,7 +2,6 @@ import static it.gov.pagopa.mbd.service.util.Constants.HEADER_REQUEST_ID; -import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Paths; diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/RequestFilter.java b/src/main/java/it/gov/pagopa/mbd/service/config/RequestFilter.java index 2e646e4..b136165 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/RequestFilter.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/RequestFilter.java @@ -1,7 +1,7 @@ package it.gov.pagopa.mbd.service.config; -import java.util.UUID; import it.gov.pagopa.mbd.service.util.Constants; +import java.util.UUID; import lombok.extern.slf4j.Slf4j; import org.slf4j.MDC; import org.springframework.core.Ordered; @@ -12,20 +12,17 @@ import org.springframework.web.server.WebFilterChain; import reactor.core.publisher.Mono; - @Component @Order(Ordered.HIGHEST_PRECEDENCE) @Slf4j -public class RequestFilter - implements WebFilter -{ +public class RequestFilter implements WebFilter { /** * Get the request ID from the custom header "X-Request-Id" if present, otherwise it generates * one. Set the X-Request-Id value in the {@code response} and in the MDC * - * @param exchange http exchange - * @param chain next filter + * @param exchange http exchange + * @param chain next filter * @return */ @Override @@ -48,6 +45,5 @@ public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { } return chain.filter(exchange); - } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/ResponseValidator.java b/src/main/java/it/gov/pagopa/mbd/service/config/ResponseValidator.java index bcc3a3c..4095e8f 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/ResponseValidator.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/ResponseValidator.java @@ -1,10 +1,9 @@ package it.gov.pagopa.mbd.service.config; import it.gov.pagopa.mbd.service.exception.AppException; - -import java.util.Set; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validator; +import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterReturning; diff --git a/src/main/java/it/gov/pagopa/mbd/service/config/WebClientConfiguration.java b/src/main/java/it/gov/pagopa/mbd/service/config/WebClientConfiguration.java index fefb1a2..4c6820c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/config/WebClientConfiguration.java +++ b/src/main/java/it/gov/pagopa/mbd/service/config/WebClientConfiguration.java @@ -3,41 +3,32 @@ import io.netty.channel.ChannelOption; import io.netty.handler.timeout.ReadTimeoutHandler; import io.netty.handler.timeout.WriteTimeoutHandler; -import it.gov.pagopa.mbd.service.client.ReactiveClient; -import it.gov.pagopa.mbd.service.exception.AppError; -import it.gov.pagopa.mbd.service.exception.AppException; +import java.time.Duration; +import java.util.concurrent.TimeUnit; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.web.reactive.function.client.ClientResponse; -import org.springframework.web.reactive.function.client.ExchangeFilterFunction; import org.springframework.web.reactive.function.client.WebClient; -import reactor.core.publisher.Mono; import reactor.netty.http.client.HttpClient; -import java.time.Duration; -import java.util.concurrent.TimeUnit; - @Configuration public class WebClientConfiguration { - @Bean - public WebClient webClient(){ - - HttpClient httpClient = HttpClient.create() - .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000) // timeout restriction - .responseTimeout(Duration.ofMillis(5000)) - .doOnConnected(conn -> conn.addHandlerLast( - new ReadTimeoutHandler(5000, TimeUnit.MILLISECONDS)) - .addHandlerLast(new WriteTimeoutHandler(5000, TimeUnit.MILLISECONDS)) - ); - - WebClient webClient = WebClient.builder() - .clientConnector(new ReactorClientHttpConnector(httpClient)) - .build(); + @Bean + public WebClient webClient() { - return webClient; + HttpClient httpClient = + HttpClient.create() + .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000) // timeout restriction + .responseTimeout(Duration.ofMillis(5000)) + .doOnConnected( + conn -> + conn.addHandlerLast(new ReadTimeoutHandler(5000, TimeUnit.MILLISECONDS)) + .addHandlerLast(new WriteTimeoutHandler(5000, TimeUnit.MILLISECONDS))); - } + WebClient webClient = + WebClient.builder().clientConnector(new ReactorClientHttpConnector(httpClient)).build(); + return webClient; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/controller/HomeController.java b/src/main/java/it/gov/pagopa/mbd/service/controller/HomeController.java index cdcc363..9a9ca47 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/controller/HomeController.java +++ b/src/main/java/it/gov/pagopa/mbd/service/controller/HomeController.java @@ -27,7 +27,6 @@ public class HomeController { @Value("${info.properties.environment}") private String environment; - @Value("${server.servlet.context-path}") String basePath; @@ -49,15 +48,14 @@ public RedirectView home() { * @return the app info */ @Operation( - summary = "health check", - description = "Return OK if application is started", - security = {@SecurityRequirement(name = "ApiKey")}, - tags = {"Home"}) + summary = "health check", + description = "Return OK if application is started", + security = {@SecurityRequirement(name = "ApiKey")}, + tags = {"Home"}) @GetMapping(value = "/info") @ResponseStatus(HttpStatus.OK) public Mono> healthCheck() { AppInfo info = AppInfo.builder().name(name).version(version).environment(environment).build(); return Mono.just(ResponseEntity.status(HttpStatus.OK).body(info)); } - } diff --git a/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java b/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java index 651543a..b81df59 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java +++ b/src/main/java/it/gov/pagopa/mbd/service/controller/MbdController.java @@ -10,9 +10,9 @@ import it.gov.pagopa.mbd.service.model.ProblemJson; import it.gov.pagopa.mbd.service.model.carts.GetCartErrorResponse; import it.gov.pagopa.mbd.service.model.carts.GetCartResponse; +import it.gov.pagopa.mbd.service.model.mdb.GetMbdRequest; import it.gov.pagopa.mbd.service.model.mdb.GetMdbReceipt; import it.gov.pagopa.mbd.service.service.MbdService; -import it.gov.pagopa.mbd.service.model.mdb.GetMbdRequest; import jakarta.validation.ConstraintViolationException; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -23,80 +23,142 @@ @RestController public class MbdController { - private final MbdService mdbService; + private final MbdService mdbService; - public MbdController(MbdService mdbService) { - this.mdbService = mdbService; - } + public MbdController(MbdService mdbService) { + this.mdbService = mdbService; + } - @Operation(summary = "getMbd", description = "Return mbd data for payment on requirement ", - security = {@SecurityRequirement(name = "ApiKey")}) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "OK", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = GetCartResponse.class))), - @ApiResponse(responseCode = "400", description = "Bad Request", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = ProblemJson.class))), - @ApiResponse(responseCode = "401", - description = "Unauthorized", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "403", - description = "Forbidden", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "404", description = "ibans for the brokerCode not found", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = ProblemJson.class))), - @ApiResponse(responseCode = "429", - description = "Too many requests", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "500", - description = "Service unavailable", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + @Operation( + summary = "getMbd", + description = "Return mbd data for payment on requirement ", + security = {@SecurityRequirement(name = "ApiKey")}) + @ApiResponses( + value = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = GetCartResponse.class))), + @ApiResponse( + responseCode = "400", + description = "Bad Request", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse( + responseCode = "401", + description = "Unauthorized", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "403", + description = "Forbidden", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "404", + description = "ibans for the brokerCode not found", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse( + responseCode = "429", + description = "Too many requests", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "500", + description = "Service unavailable", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = GetCartErrorResponse.class))) - }) - @PostMapping(value = "/organizations/{fiscalCodeEC}/mbd", produces = MediaType.APPLICATION_JSON_VALUE) - public Mono getMdb(@PathVariable("fiscalCodeEC") String fiscalCodeEC, - @RequestBody GetMbdRequest request) { - return mdbService.getMbd(fiscalCodeEC,request).onErrorResume(e -> { - if (e instanceof ConstraintViolationException) { - return Mono.error(e); - } - if (e instanceof AppException) { - return Mono.just(ResponseEntity.status(((AppException) e).getHttpStatus()) + }) + @PostMapping( + value = "/organizations/{fiscalCodeEC}/mbd", + produces = MediaType.APPLICATION_JSON_VALUE) + public Mono getMdb( + @PathVariable("fiscalCodeEC") String fiscalCodeEC, @RequestBody GetMbdRequest request) { + return mdbService + .getMbd(fiscalCodeEC, request) + .onErrorResume( + e -> { + if (e instanceof ConstraintViolationException) { + return Mono.error(e); + } + if (e instanceof AppException) { + return Mono.just( + ResponseEntity.status(((AppException) e).getHttpStatus()) .header("Content-Type", MediaType.APPLICATION_JSON_VALUE) - .body(GetCartErrorResponse.builder() - .errorUrl(request.getReturnUrls().getErrorUrl()).build())); - } - return Mono.just(ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).header("Content-Type", - MediaType.APPLICATION_JSON_VALUE).body(GetCartErrorResponse.builder() - .errorUrl(request.getReturnUrls().getErrorUrl()).build())); - }); - } + .body( + GetCartErrorResponse.builder() + .errorUrl(request.getReturnUrls().getErrorUrl()) + .build())); + } + return Mono.just( + ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .header("Content-Type", MediaType.APPLICATION_JSON_VALUE) + .body( + GetCartErrorResponse.builder() + .errorUrl(request.getReturnUrls().getErrorUrl()) + .build())); + }); + } - @Operation(summary = "getPaymentReceipt", description = "Return receipt of payment on requirement ", - security = {@SecurityRequirement(name = "ApiKey")}) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "OK", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = GetMdbReceipt.class))), - @ApiResponse(responseCode = "400", description = "Bad Request", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = ProblemJson.class))), - @ApiResponse(responseCode = "401", - description = "Unauthorized", content = @Content( - schema = @Schema(implementation = ProblemJson.class))), - @ApiResponse(responseCode = "403", - description = "Forbidden", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "404", description = "ibans for the brokerCode not found", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = ProblemJson.class))), - @ApiResponse(responseCode = "429", - description = "Too many requests", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "500", - description = "Service unavailable", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + @Operation( + summary = "getPaymentReceipt", + description = "Return receipt of payment on requirement ", + security = {@SecurityRequirement(name = "ApiKey")}) + @ApiResponses( + value = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = GetMdbReceipt.class))), + @ApiResponse( + responseCode = "400", + description = "Bad Request", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse( + responseCode = "401", + description = "Unauthorized", + content = @Content(schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse( + responseCode = "403", + description = "Forbidden", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "404", + description = "ibans for the brokerCode not found", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse( + responseCode = "429", + description = "Too many requests", + content = @Content(schema = @Schema())), + @ApiResponse( + responseCode = "500", + description = "Service unavailable", + content = + @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ProblemJson.class))) - }) - @GetMapping(value = "/organizations/{fiscalCode}/receipt/{nav}", produces = MediaType.APPLICATION_XML_VALUE) - public Mono getPaymentReceipts(@PathVariable("fiscalCode") String fiscalCode, - @PathVariable("nav") String nav) { - return mdbService.getPaymentReceipts(fiscalCode, nav).onErrorResume(Mono::error); - - } + }) + @GetMapping( + value = "/organizations/{fiscalCode}/receipt/{nav}", + produces = MediaType.APPLICATION_XML_VALUE) + public Mono getPaymentReceipts( + @PathVariable("fiscalCode") String fiscalCode, @PathVariable("nav") String nav) { + return mdbService.getPaymentReceipts(fiscalCode, nav).onErrorResume(Mono::error); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/AppError.java b/src/main/java/it/gov/pagopa/mbd/service/exception/AppError.java index 15b5eb7..14cd08f 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/AppError.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/AppError.java @@ -12,11 +12,26 @@ public enum AppError { FORBIDDEN(HttpStatus.FORBIDDEN, "Forbidden", "This method is forbidden"), RESPONSE_NOT_READABLE( HttpStatus.BAD_GATEWAY, "Response Not Readable", "The response body is not readable"), - PAYMENT_NOTICE_REQUEST_MAP_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Error Mapping DemandPaymentNoticeRequest", "Error Mapping DemandPaymentNoticeRequest"), - PAYMENT_NOTICE_REQUEST_CALL_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Error Calling DemandPaymentNoticeRequest", "Error Calling DemandPaymentNoticeRequest"), - CART_REQUEST_MAP_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Error Calling GetCartRequest", "Error Mapping GetCartRequest"), - CART_REQUEST_CALL_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Error Calling GetCartRequest", "Error Mapping GetCartRequest"), - PAYMENT_RECEIPTS_CALL_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Error Calling Payment Receipts", "Error Mapping GetPaymentReceipts"), + PAYMENT_NOTICE_REQUEST_MAP_ERROR( + HttpStatus.INTERNAL_SERVER_ERROR, + "Error Mapping DemandPaymentNoticeRequest", + "Error Mapping DemandPaymentNoticeRequest"), + PAYMENT_NOTICE_REQUEST_CALL_ERROR( + HttpStatus.INTERNAL_SERVER_ERROR, + "Error Calling DemandPaymentNoticeRequest", + "Error Calling DemandPaymentNoticeRequest"), + CART_REQUEST_MAP_ERROR( + HttpStatus.INTERNAL_SERVER_ERROR, + "Error Calling GetCartRequest", + "Error Mapping GetCartRequest"), + CART_REQUEST_CALL_ERROR( + HttpStatus.INTERNAL_SERVER_ERROR, + "Error Calling GetCartRequest", + "Error Mapping GetCartRequest"), + PAYMENT_RECEIPTS_CALL_ERROR( + HttpStatus.INTERNAL_SERVER_ERROR, + "Error Calling Payment Receipts", + "Error Mapping GetPaymentReceipts"), UNKNOWN(null, null, null); diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/AppException.java b/src/main/java/it/gov/pagopa/mbd/service/exception/AppException.java index 9f3c548..d932b5e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/AppException.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/AppException.java @@ -1,8 +1,7 @@ package it.gov.pagopa.mbd.service.exception; -import java.util.Formatter; - import jakarta.validation.constraints.NotNull; +import java.util.Formatter; import lombok.EqualsAndHashCode; import lombok.Value; import org.springframework.http.HttpStatus; diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/CartMappingException.java b/src/main/java/it/gov/pagopa/mbd/service/exception/CartMappingException.java index 1a96563..789f13d 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/CartMappingException.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/CartMappingException.java @@ -10,9 +10,7 @@ @Validated public class CartMappingException extends RuntimeException { - public CartMappingException(@NotNull String message, - Throwable cause) { - super(message, cause); - } - + public CartMappingException(@NotNull String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java index ff47566..0f0e367 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/ErrorHandler.java @@ -4,11 +4,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import feign.FeignException; import it.gov.pagopa.mbd.service.model.ProblemJson; +import jakarta.validation.ConstraintViolationException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; - -import jakarta.validation.ConstraintViolationException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.TypeMismatchException; import org.springframework.http.HttpHeaders; @@ -21,7 +20,6 @@ import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.context.request.WebRequest; import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; import org.springframework.web.reactive.result.method.annotation.ResponseEntityExceptionHandler; import org.springframework.web.server.ServerWebExchange; @@ -43,8 +41,10 @@ public class ErrorHandler extends ResponseEntityExceptionHandler { * @return a {@link ProblemJson} as response with the cause and with a 400 as HTTP status */ @ExceptionHandler({HttpMessageNotReadableException.class}) - - protected Mono> handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatusCode status, + protected Mono> handleHttpMessageNotReadable( + HttpMessageNotReadableException ex, + HttpHeaders headers, + HttpStatusCode status, ServerWebExchange request) { log.warn("Input not readable: ", ex); var errorResponse = @@ -66,17 +66,21 @@ protected Mono> handleHttpMessageNotReadable(HttpMessageN * @return a {@code ResponseEntity} instance */ @ExceptionHandler({TypeMismatchException.class}) - protected Mono> handleTypeMismatch(TypeMismatchException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange request) { + protected Mono> handleTypeMismatch( + TypeMismatchException ex, + HttpHeaders headers, + HttpStatusCode status, + ServerWebExchange request) { log.warn("Type mismatch: ", ex); var errorResponse = - ProblemJson.builder() - .status(HttpStatus.BAD_REQUEST.value()) - .title(AppError.BAD_REQUEST.getTitle()) - .detail( - String.format( - "Invalid value %s for property %s", - ex.getValue(), ((MethodArgumentTypeMismatchException) ex).getName())) - .build(); + ProblemJson.builder() + .status(HttpStatus.BAD_REQUEST.value()) + .title(AppError.BAD_REQUEST.getTitle()) + .detail( + String.format( + "Invalid value %s for property %s", + ex.getValue(), ((MethodArgumentTypeMismatchException) ex).getName())) + .build(); return Mono.just(new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST)); } @@ -90,7 +94,11 @@ protected Mono> handleTypeMismatch(TypeMismatchException * @return a {@link ProblemJson} as response with the cause and with a 400 as HTTP status */ @Override - protected Mono> handleUnsatisfiedRequestParameterException(UnsatisfiedRequestParameterException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) { + protected Mono> handleUnsatisfiedRequestParameterException( + UnsatisfiedRequestParameterException ex, + HttpHeaders headers, + HttpStatusCode status, + ServerWebExchange exchange) { log.warn("Unsatisfied request parameter: ", ex); var errorResponse = ProblemJson.builder() @@ -101,7 +109,6 @@ protected Mono> handleUnsatisfiedRequestParameterExceptio return Mono.just(new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST)); } - /** * Handle if validation constraints are unsatisfied * @@ -112,8 +119,11 @@ protected Mono> handleUnsatisfiedRequestParameterExceptio * @return a {@link ProblemJson} as response with the cause and with a 400 as HTTP status */ @ExceptionHandler({MethodArgumentNotValidException.class}) - protected Mono> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatusCode status, - ServerWebExchange request) { + protected Mono> handleMethodArgumentNotValid( + MethodArgumentNotValidException ex, + HttpHeaders headers, + HttpStatusCode status, + ServerWebExchange request) { List details = new ArrayList<>(); for (FieldError error : ex.getBindingResult().getFieldErrors()) { details.add(error.getField() + ": " + error.getDefaultMessage()); @@ -147,11 +157,11 @@ public Mono> handleWebClientException( WebClientException ex, ServerWebExchange exchange) { log.warn("Validation Error raised:", ex); var errorResponse = - ProblemJson.builder() - .status(HttpStatus.BAD_REQUEST.value()) - .title(AppError.INTERNAL_SERVER_ERROR.getTitle()) - .detail(ex.getMessage()) - .build(); + ProblemJson.builder() + .status(HttpStatus.BAD_REQUEST.value()) + .title(AppError.INTERNAL_SERVER_ERROR.getTitle()) + .detail(ex.getMessage()) + .build(); return Mono.just(new ResponseEntity<>(errorResponse, HttpStatus.INTERNAL_SERVER_ERROR)); } diff --git a/src/main/java/it/gov/pagopa/mbd/service/exception/WebClientException.java b/src/main/java/it/gov/pagopa/mbd/service/exception/WebClientException.java index 78a84f6..f314a5c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/exception/WebClientException.java +++ b/src/main/java/it/gov/pagopa/mbd/service/exception/WebClientException.java @@ -10,9 +10,7 @@ @Validated public class WebClientException extends RuntimeException { - public WebClientException(@NotNull String message, - Throwable cause) { - super(message, cause); - } - + public WebClientException(@NotNull String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/mapper/RequestMapper.java b/src/main/java/it/gov/pagopa/mbd/service/mapper/RequestMapper.java index 8163230..32bfd3b 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/mapper/RequestMapper.java +++ b/src/main/java/it/gov/pagopa/mbd/service/mapper/RequestMapper.java @@ -1,5 +1,8 @@ package it.gov.pagopa.mbd.service.mapper; +import static org.hibernate.validator.internal.util.Contracts.assertNotNull; +import static org.hibernate.validator.internal.util.Contracts.assertTrue; + import it.gov.pagopa.mbd.service.exception.CartMappingException; import it.gov.pagopa.mbd.service.model.carts.CartPaymentNotice; import it.gov.pagopa.mbd.service.model.carts.GetCartRequest; @@ -11,89 +14,109 @@ import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.CtPaymentOptionsDescriptionList; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeRequest; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeResponse; -import org.springframework.oxm.jaxb.Jaxb2Marshaller; -import org.springframework.xml.transform.StringResult; - -import java.math.RoundingMode; import java.util.Base64; import java.util.Collections; import java.util.List; - -import static org.hibernate.validator.internal.util.Contracts.assertNotNull; -import static org.hibernate.validator.internal.util.Contracts.assertTrue; +import org.springframework.oxm.jaxb.Jaxb2Marshaller; public class RequestMapper { - public static DemandPaymentNoticeRequest mapDemandPaymentNoticeRequest( - String idPsp, String idBrokerPsp, String idChannel, String fiscalCodeEC, - Jaxb2Marshaller marshaller, GetMbdRequest getMdbRequest) { + public static DemandPaymentNoticeRequest mapDemandPaymentNoticeRequest( + String idPsp, + String idBrokerPsp, + String idChannel, + String fiscalCodeEC, + Jaxb2Marshaller marshaller, + GetMbdRequest getMdbRequest) { - PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0); + PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0); - CtService ctMarcaDaBollo = - CtService.builder() - .debtorFiscalCode(paymentNotice.getFiscalCode()) - .debtorName(paymentNotice.getFirstName()) - .debtorSurname(paymentNotice.getLastName()) - .debtorEmail(paymentNotice.getEmail()) - .debtorProvince(paymentNotice.getProvince()) - .ciFiscalCode(fiscalCodeEC) - .documentHash(paymentNotice.getDocumentHash()) - .build(); + CtService ctMarcaDaBollo = + CtService.builder() + .debtorFiscalCode(paymentNotice.getFiscalCode()) + .debtorName(paymentNotice.getFirstName()) + .debtorSurname(paymentNotice.getLastName()) + .debtorEmail(paymentNotice.getEmail()) + .debtorProvince(paymentNotice.getProvince()) + .ciFiscalCode(fiscalCodeEC) + .documentHash(paymentNotice.getDocumentHash()) + .build(); - return DemandPaymentNoticeRequest.builder() - .idPSP(idPsp) - .idBrokerPSP(idBrokerPsp) - .idChannel(idChannel) - .idSoggettoServizio(getMdbRequest.getIdCIService()) - .password("") - .datiSpecificiServizio(Base64.getMimeEncoder().encode( - ("\n" + - "\n" + - " "+getMdbRequest.getPaymentNotices().get(0).getAmount()+"\n" + - " "+ctMarcaDaBollo.getDebtorFiscalCode()+"\n" + - " "+ctMarcaDaBollo.getDebtorName()+"\n" + - " "+ctMarcaDaBollo.getDebtorSurname()+"\n" + - " "+ctMarcaDaBollo.getDebtorEmail()+"\n" + - " "+ctMarcaDaBollo.getDebtorProvince()+"\n" + - " "+ctMarcaDaBollo.getCiFiscalCode()+"\n" + - " "+ctMarcaDaBollo.getDocumentHash()+"\n" + - "").getBytes() - )) - .build(); - } + return DemandPaymentNoticeRequest.builder() + .idPSP(idPsp) + .idBrokerPSP(idBrokerPsp) + .idChannel(idChannel) + .idSoggettoServizio(getMdbRequest.getIdCIService()) + .password("") + .datiSpecificiServizio( + Base64.getMimeEncoder() + .encode( + ("\n" + + "\n" + + " " + + getMdbRequest.getPaymentNotices().get(0).getAmount() + + "\n" + + " " + + ctMarcaDaBollo.getDebtorFiscalCode() + + "\n" + + " " + + ctMarcaDaBollo.getDebtorName() + + "\n" + + " " + + ctMarcaDaBollo.getDebtorSurname() + + "\n" + + " " + + ctMarcaDaBollo.getDebtorEmail() + + "\n" + + " " + + ctMarcaDaBollo.getDebtorProvince() + + "\n" + + " " + + ctMarcaDaBollo.getCiFiscalCode() + + "\n" + + " " + + ctMarcaDaBollo.getDocumentHash() + + "\n" + + "") + .getBytes())) + .build(); + } - public static GetCartRequest mapCartRequest( - GetMbdRequest request, DemandPaymentNoticeResponse demandPaymentNoticeResponse) { - try { - assertNotNull(demandPaymentNoticeResponse); - CtPaymentOptionsDescriptionList ctPaymentOptionsDescriptionList = demandPaymentNoticeResponse.getPaymentList(); - assertNotNull(ctPaymentOptionsDescriptionList); - List ctPaymentOptionsDescriptions = - ctPaymentOptionsDescriptionList.getPaymentOptionDescription(); - assertNotNull(ctPaymentOptionsDescriptions); - assertTrue(!ctPaymentOptionsDescriptions.isEmpty(), "Missing PaymentOption"); - assertNotNull(demandPaymentNoticeResponse.getQrCode()); - return GetCartRequest.builder() - .emailNotice(request.getPaymentNotices().get(0).getEmail()) - .returnUrls(ReturnUrls.builder() - .returnCancelUrl(request.getReturnUrls().getCancelUrl()) - .returnErrorUrl(request.getReturnUrls().getErrorUrl()) - .returnOkUrl(request.getReturnUrls().getSuccessUrl()) - .build()) - .paymentNotices(Collections.singletonList( - CartPaymentNotice.builder() - .fiscalCode(demandPaymentNoticeResponse.getQrCode().getFiscalCode()) - .amount(request.getPaymentNotices().get(0).getAmount()) - .companyName(demandPaymentNoticeResponse.getCompanyName()) - .description(demandPaymentNoticeResponse.getPaymentDescription()) - .noticeNumber(demandPaymentNoticeResponse.getQrCode().getNoticeNumber()) - .build() - )) - .build(); - } catch (Exception e) { - throw new CartMappingException(e.getMessage(), e); - } + public static GetCartRequest mapCartRequest( + GetMbdRequest request, DemandPaymentNoticeResponse demandPaymentNoticeResponse) { + try { + assertNotNull(demandPaymentNoticeResponse); + CtPaymentOptionsDescriptionList ctPaymentOptionsDescriptionList = + demandPaymentNoticeResponse.getPaymentList(); + assertNotNull(ctPaymentOptionsDescriptionList); + List ctPaymentOptionsDescriptions = + ctPaymentOptionsDescriptionList.getPaymentOptionDescription(); + assertNotNull(ctPaymentOptionsDescriptions); + assertTrue(!ctPaymentOptionsDescriptions.isEmpty(), "Missing PaymentOption"); + assertNotNull(demandPaymentNoticeResponse.getQrCode()); + return GetCartRequest.builder() + .emailNotice(request.getPaymentNotices().get(0).getEmail()) + .returnUrls( + ReturnUrls.builder() + .returnCancelUrl(request.getReturnUrls().getCancelUrl()) + .returnErrorUrl(request.getReturnUrls().getErrorUrl()) + .returnOkUrl(request.getReturnUrls().getSuccessUrl()) + .build()) + .paymentNotices( + Collections.singletonList( + CartPaymentNotice.builder() + .fiscalCode(demandPaymentNoticeResponse.getQrCode().getFiscalCode()) + .amount(request.getPaymentNotices().get(0).getAmount()) + .companyName(demandPaymentNoticeResponse.getCompanyName()) + .description(demandPaymentNoticeResponse.getPaymentDescription()) + .noticeNumber(demandPaymentNoticeResponse.getQrCode().getNoticeNumber()) + .build())) + .build(); + } catch (Exception e) { + throw new CartMappingException(e.getMessage(), e); } - + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/carts/CartPaymentNotice.java b/src/main/java/it/gov/pagopa/mbd/service/model/carts/CartPaymentNotice.java index ca962df..d672b66 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/carts/CartPaymentNotice.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/carts/CartPaymentNotice.java @@ -11,10 +11,9 @@ @Builder public class CartPaymentNotice { - private String noticeNumber; - private String fiscalCode; - private Long amount; - private String companyName; - private String description; - + private String noticeNumber; + private String fiscalCode; + private Long amount; + private String companyName; + private String description; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartErrorResponse.java b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartErrorResponse.java index 5b9a413..a8f3453 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartErrorResponse.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartErrorResponse.java @@ -11,6 +11,5 @@ @Builder public class GetCartErrorResponse { - private String errorUrl; - + private String errorUrl; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartRequest.java b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartRequest.java index d248b8f..4471c08 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartRequest.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartRequest.java @@ -1,23 +1,18 @@ package it.gov.pagopa.mbd.service.model.carts; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @AllArgsConstructor @NoArgsConstructor @Builder public class GetCartRequest { - private String emailNotice; - private List paymentNotices; - private ReturnUrls returnUrls; - - - - + private String emailNotice; + private List paymentNotices; + private ReturnUrls returnUrls; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartResponse.java b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartResponse.java index ed59038..701fdae 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartResponse.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/carts/GetCartResponse.java @@ -11,10 +11,9 @@ @Builder public class GetCartResponse { - private String checkoutRedirectUrl; + private String checkoutRedirectUrl; - private String navDownloadLink; - - private String mbdNav; + private String navDownloadLink; + private String mbdNav; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/carts/ReturnUrls.java b/src/main/java/it/gov/pagopa/mbd/service/model/carts/ReturnUrls.java index f0b20d5..b852921 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/carts/ReturnUrls.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/carts/ReturnUrls.java @@ -11,8 +11,7 @@ @Builder public class ReturnUrls { - private String returnOkUrl; - private String returnCancelUrl; - private String returnErrorUrl; - + private String returnOkUrl; + private String returnCancelUrl; + private String returnErrorUrl; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMbdRequest.java b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMbdRequest.java index 7db408b..9825b94 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMbdRequest.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMbdRequest.java @@ -4,13 +4,12 @@ import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @AllArgsConstructor @NoArgsConstructor @@ -18,13 +17,10 @@ @Valid public class GetMbdRequest { - @Size(min = 1, max = 1) - @Valid - private List paymentNotices; - @NotBlank - private String idCIService; - @NotNull - @Valid - private ReturnUrls returnUrls; + @Size(min = 1, max = 1) + @Valid + private List paymentNotices; + @NotBlank private String idCIService; + @NotNull @Valid private ReturnUrls returnUrls; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMdbReceipt.java b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMdbReceipt.java index fcd5f27..da596b4 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMdbReceipt.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/GetMdbReceipt.java @@ -13,6 +13,5 @@ @Valid public class GetMdbReceipt { - private byte[] content; - + private byte[] content; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/PaymentNotice.java b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/PaymentNotice.java index d4597cb..d791bce 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/PaymentNotice.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/PaymentNotice.java @@ -12,20 +12,13 @@ @Builder public class PaymentNotice { - @NotBlank - private String firstName; - @NotBlank - private String lastName; - @NotBlank - private String fiscalCode; - @NotBlank - private String email; - @NotNull - private Long amount; - @NotBlank - private String province; - - @Size(min = 44, max = 44) - private String documentHash; + @NotBlank private String firstName; + @NotBlank private String lastName; + @NotBlank private String fiscalCode; + @NotBlank private String email; + @NotNull private Long amount; + @NotBlank private String province; + @Size(min = 44, max = 44) + private String documentHash; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/ReturnUrls.java b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/ReturnUrls.java index cba491e..b0a0fa3 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/mdb/ReturnUrls.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/mdb/ReturnUrls.java @@ -12,11 +12,7 @@ @Builder public class ReturnUrls { - @NotBlank - private String successUrl; - @NotBlank - private String cancelUrl; - @NotBlank - private String errorUrl; - + @NotBlank private String successUrl; + @NotBlank private String cancelUrl; + @NotBlank private String errorUrl; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/CtService.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/CtService.java index 9a1693c..0b18329 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/CtService.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/CtService.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.12 alle 03:15:53 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.12 alle 03:15:53 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.marcaDaBollo; import jakarta.xml.bind.annotation.*; @@ -14,12 +13,11 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per ctService complex type. - * + * Classe Java per ctService complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctService">
  *   <complexContent>
@@ -37,19 +35,19 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctService", propOrder = { - "debtorFiscalCode", - "debtorName", - "debtorSurname", - "debtorEmail", - "debtorProvince", - "ciFiscalCode", - "documentHash" -}) +@XmlType( + name = "ctService", + propOrder = { + "debtorFiscalCode", + "debtorName", + "debtorSurname", + "debtorEmail", + "debtorProvince", + "ciFiscalCode", + "documentHash" + }) @AllArgsConstructor @NoArgsConstructor @Builder @@ -57,187 +55,150 @@ @XmlRootElement public class CtService { - @XmlElement(required = true) - protected String debtorFiscalCode; - @XmlElement(required = true) - protected String debtorName; - @XmlElement(required = true) - protected String debtorSurname; - @XmlElement(required = true) - protected String debtorEmail; - @XmlElement(required = true) - protected String debtorProvince; - @XmlElement(required = true) - protected String ciFiscalCode; - @XmlElement(required = true) - protected String documentHash; - - /** - * Recupera il valore della proprietà debtorFiscalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDebtorFiscalCode() { - return debtorFiscalCode; - } - - /** - * Imposta il valore della proprietà debtorFiscalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDebtorFiscalCode(String value) { - this.debtorFiscalCode = value; - } - - /** - * Recupera il valore della proprietà debtorName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDebtorName() { - return debtorName; - } - - /** - * Imposta il valore della proprietà debtorName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDebtorName(String value) { - this.debtorName = value; - } - - /** - * Recupera il valore della proprietà debtorSurname. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDebtorSurname() { - return debtorSurname; - } - - /** - * Imposta il valore della proprietà debtorSurname. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDebtorSurname(String value) { - this.debtorSurname = value; - } - - /** - * Recupera il valore della proprietà debtorEmail. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDebtorEmail() { - return debtorEmail; - } - - /** - * Imposta il valore della proprietà debtorEmail. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDebtorEmail(String value) { - this.debtorEmail = value; - } - - /** - * Recupera il valore della proprietà debtorProvince. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDebtorProvince() { - return debtorProvince; - } - - /** - * Imposta il valore della proprietà debtorProvince. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDebtorProvince(String value) { - this.debtorProvince = value; - } - - /** - * Recupera il valore della proprietà ciFiscalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCiFiscalCode() { - return ciFiscalCode; - } - - /** - * Imposta il valore della proprietà ciFiscalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCiFiscalCode(String value) { - this.ciFiscalCode = value; - } - - /** - * Recupera il valore della proprietà documentHash. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDocumentHash() { - return documentHash; - } - - /** - * Imposta il valore della proprietà documentHash. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDocumentHash(String value) { - this.documentHash = value; - } - + @XmlElement(required = true) + protected String debtorFiscalCode; + + @XmlElement(required = true) + protected String debtorName; + + @XmlElement(required = true) + protected String debtorSurname; + + @XmlElement(required = true) + protected String debtorEmail; + + @XmlElement(required = true) + protected String debtorProvince; + + @XmlElement(required = true) + protected String ciFiscalCode; + + @XmlElement(required = true) + protected String documentHash; + + /** + * Recupera il valore della proprietà debtorFiscalCode. + * + * @return possible object is {@link String } + */ + public String getDebtorFiscalCode() { + return debtorFiscalCode; + } + + /** + * Imposta il valore della proprietà debtorFiscalCode. + * + * @param value allowed object is {@link String } + */ + public void setDebtorFiscalCode(String value) { + this.debtorFiscalCode = value; + } + + /** + * Recupera il valore della proprietà debtorName. + * + * @return possible object is {@link String } + */ + public String getDebtorName() { + return debtorName; + } + + /** + * Imposta il valore della proprietà debtorName. + * + * @param value allowed object is {@link String } + */ + public void setDebtorName(String value) { + this.debtorName = value; + } + + /** + * Recupera il valore della proprietà debtorSurname. + * + * @return possible object is {@link String } + */ + public String getDebtorSurname() { + return debtorSurname; + } + + /** + * Imposta il valore della proprietà debtorSurname. + * + * @param value allowed object is {@link String } + */ + public void setDebtorSurname(String value) { + this.debtorSurname = value; + } + + /** + * Recupera il valore della proprietà debtorEmail. + * + * @return possible object is {@link String } + */ + public String getDebtorEmail() { + return debtorEmail; + } + + /** + * Imposta il valore della proprietà debtorEmail. + * + * @param value allowed object is {@link String } + */ + public void setDebtorEmail(String value) { + this.debtorEmail = value; + } + + /** + * Recupera il valore della proprietà debtorProvince. + * + * @return possible object is {@link String } + */ + public String getDebtorProvince() { + return debtorProvince; + } + + /** + * Imposta il valore della proprietà debtorProvince. + * + * @param value allowed object is {@link String } + */ + public void setDebtorProvince(String value) { + this.debtorProvince = value; + } + + /** + * Recupera il valore della proprietà ciFiscalCode. + * + * @return possible object is {@link String } + */ + public String getCiFiscalCode() { + return ciFiscalCode; + } + + /** + * Imposta il valore della proprietà ciFiscalCode. + * + * @param value allowed object is {@link String } + */ + public void setCiFiscalCode(String value) { + this.ciFiscalCode = value; + } + + /** + * Recupera il valore della proprietà documentHash. + * + * @return possible object is {@link String } + */ + public String getDocumentHash() { + return documentHash; + } + + /** + * Imposta il valore della proprietà documentHash. + * + * @param value allowed object is {@link String } + */ + public void setDocumentHash(String value) { + this.documentHash = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/ObjectFactory.java index fa35bf7..7f6a744 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/ObjectFactory.java @@ -1,65 +1,53 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.12 alle 03:15:53 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.12 alle 03:15:53 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.marcaDaBollo; import jakarta.xml.bind.JAXBElement; import jakarta.xml.bind.annotation.XmlElementDecl; import jakarta.xml.bind.annotation.XmlRegistry; - import javax.xml.namespace.QName; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the it.gov.spcoop.puntoaccessopsp.generalservice package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * + * This object contains factory methods for each Java content interface and Java element interface + * generated in the it.gov.spcoop.puntoaccessopsp.generalservice package. + * + *

An ObjectFactory allows you to programatically construct new instances of the Java + * representation for XML content. The Java representation of XML content can consist of schema + * derived interfaces and classes representing the binding of schema type definitions, element + * declarations and model groups. Factory methods for each of these are provided in this class. */ @XmlRegistry public class ObjectFactory { - private final static QName _Service_QNAME = new QName("http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", "service"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.gov.spcoop.puntoaccessopsp.generalservice - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link CtService } - * - */ - public CtService createCtService() { - return new CtService(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CtService }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >} - */ - @XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", name = "service") - public JAXBElement createService(CtService value) { - return new JAXBElement(_Service_QNAME, CtService.class, null, value); - } - + private static final QName _Service_QNAME = + new QName("http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", "service"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes + * for package: it.gov.spcoop.puntoaccessopsp.generalservice + */ + public ObjectFactory() {} + + /** Create an instance of {@link CtService } */ + public CtService createCtService() { + return new CtService(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CtService }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >} + */ + @XmlElementDecl( + namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", + name = "service") + public JAXBElement createService(CtService value) { + return new JAXBElement(_Service_QNAME, CtService.class, null, value); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/package-info.java index 4c6749d..dc3f55b 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/package-info.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/marcaDaBollo/package-info.java @@ -1,9 +1,11 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.12 alle 03:15:53 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.12 alle 03:15:53 PM CET // -@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) +@jakarta.xml.bind.annotation.XmlSchema( + namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", + elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) package it.gov.pagopa.mbd.service.model.xml.node.marcaDaBollo; diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionDescription.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionDescription.java index f47199d..4934a77 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionDescription.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionDescription.java @@ -1,31 +1,29 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; -import java.math.BigDecimal; -import javax.xml.datatype.XMLGregorianCalendar; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlSchemaType; import jakarta.xml.bind.annotation.XmlType; +import java.math.BigDecimal; +import javax.xml.datatype.XMLGregorianCalendar; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per ctPaymentOptionDescription complex type. - * + * Classe Java per ctPaymentOptionDescription complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctPaymentOptionDescription">
  *   <complexContent>
@@ -40,125 +38,98 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctPaymentOptionDescription", propOrder = { - "amount", - "options", - "dueDate", - "paymentNote" -}) +@XmlType( + name = "ctPaymentOptionDescription", + propOrder = {"amount", "options", "dueDate", "paymentNote"}) @AllArgsConstructor @NoArgsConstructor @Builder @Data public class CtPaymentOptionDescription { - @XmlElement(required = true) - protected BigDecimal amount; - @XmlElement(required = true) - @XmlSchemaType(name = "string") - protected StAmountOptionPSP options; - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar dueDate; - protected String paymentNote; + @XmlElement(required = true) + protected BigDecimal amount; + + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StAmountOptionPSP options; + + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar dueDate; - /** - * Recupera il valore della proprietà amount. - * - * @return - * possible object is - * {@link BigDecimal } - * - */ - public BigDecimal getAmount() { - return amount; - } + protected String paymentNote; - /** - * Imposta il valore della proprietà amount. - * - * @param value - * allowed object is - * {@link BigDecimal } - * - */ - public void setAmount(BigDecimal value) { - this.amount = value; - } + /** + * Recupera il valore della proprietà amount. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getAmount() { + return amount; + } - /** - * Recupera il valore della proprietà options. - * - * @return - * possible object is - * {@link StAmountOptionPSP } - * - */ - public StAmountOptionPSP getOptions() { - return options; - } + /** + * Imposta il valore della proprietà amount. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setAmount(BigDecimal value) { + this.amount = value; + } - /** - * Imposta il valore della proprietà options. - * - * @param value - * allowed object is - * {@link StAmountOptionPSP } - * - */ - public void setOptions(StAmountOptionPSP value) { - this.options = value; - } + /** + * Recupera il valore della proprietà options. + * + * @return possible object is {@link StAmountOptionPSP } + */ + public StAmountOptionPSP getOptions() { + return options; + } - /** - * Recupera il valore della proprietà dueDate. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDueDate() { - return dueDate; - } + /** + * Imposta il valore della proprietà options. + * + * @param value allowed object is {@link StAmountOptionPSP } + */ + public void setOptions(StAmountOptionPSP value) { + this.options = value; + } - /** - * Imposta il valore della proprietà dueDate. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDueDate(XMLGregorianCalendar value) { - this.dueDate = value; - } + /** + * Recupera il valore della proprietà dueDate. + * + * @return possible object is {@link XMLGregorianCalendar } + */ + public XMLGregorianCalendar getDueDate() { + return dueDate; + } - /** - * Recupera il valore della proprietà paymentNote. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPaymentNote() { - return paymentNote; - } + /** + * Imposta il valore della proprietà dueDate. + * + * @param value allowed object is {@link XMLGregorianCalendar } + */ + public void setDueDate(XMLGregorianCalendar value) { + this.dueDate = value; + } - /** - * Imposta il valore della proprietà paymentNote. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPaymentNote(String value) { - this.paymentNote = value; - } + /** + * Recupera il valore della proprietà paymentNote. + * + * @return possible object is {@link String } + */ + public String getPaymentNote() { + return paymentNote; + } + /** + * Imposta il valore della proprietà paymentNote. + * + * @param value allowed object is {@link String } + */ + public void setPaymentNote(String value) { + this.paymentNote = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionsDescriptionList.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionsDescriptionList.java index df2813a..bf0b1e3 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionsDescriptionList.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtPaymentOptionsDescriptionList.java @@ -1,30 +1,28 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; -import java.util.ArrayList; -import java.util.List; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per ctPaymentOptionsDescriptionList complex type. - * + * Classe Java per ctPaymentOptionsDescriptionList complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctPaymentOptionsDescriptionList">
  *   <complexContent>
@@ -36,49 +34,40 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctPaymentOptionsDescriptionList", propOrder = { - "paymentOptionDescription" -}) +@XmlType( + name = "ctPaymentOptionsDescriptionList", + propOrder = {"paymentOptionDescription"}) @AllArgsConstructor @NoArgsConstructor @Data @Builder public class CtPaymentOptionsDescriptionList { - @XmlElement(required = true) - protected List paymentOptionDescription; + @XmlElement(required = true) + protected List paymentOptionDescription; - /** - * Gets the value of the paymentOptionDescription property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the paymentOptionDescription property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getPaymentOptionDescription().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link CtPaymentOptionDescription } - * - * - */ - public List getPaymentOptionDescription() { - if (paymentOptionDescription == null) { - paymentOptionDescription = new ArrayList(); - } - return this.paymentOptionDescription; + /** + * Gets the value of the paymentOptionDescription property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the paymentOptionDescription + * property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getPaymentOptionDescription().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link CtPaymentOptionDescription } + */ + public List getPaymentOptionDescription() { + if (paymentOptionDescription == null) { + paymentOptionDescription = new ArrayList(); } - + return this.paymentOptionDescription; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtQrCode.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtQrCode.java index ad28bc4..a6e171c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtQrCode.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/CtQrCode.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; import jakarta.xml.bind.annotation.XmlAccessType; @@ -17,12 +16,11 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per ctQrCode complex type. - * + * Classe Java per ctQrCode complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctQrCode">
  *   <complexContent>
@@ -35,71 +33,56 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctQrCode", propOrder = { - "fiscalCode", - "noticeNumber" -}) +@XmlType( + name = "ctQrCode", + propOrder = {"fiscalCode", "noticeNumber"}) @AllArgsConstructor @NoArgsConstructor @Builder @Data public class CtQrCode { - @XmlElement(required = true) - protected String fiscalCode; - @XmlElement(required = true) - protected String noticeNumber; + @XmlElement(required = true) + protected String fiscalCode; - /** - * Recupera il valore della proprietà fiscalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFiscalCode() { - return fiscalCode; - } + @XmlElement(required = true) + protected String noticeNumber; - /** - * Imposta il valore della proprietà fiscalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFiscalCode(String value) { - this.fiscalCode = value; - } + /** + * Recupera il valore della proprietà fiscalCode. + * + * @return possible object is {@link String } + */ + public String getFiscalCode() { + return fiscalCode; + } - /** - * Recupera il valore della proprietà noticeNumber. - * - * @return - * possible object is - * {@link String } - * - */ - public String getNoticeNumber() { - return noticeNumber; - } + /** + * Imposta il valore della proprietà fiscalCode. + * + * @param value allowed object is {@link String } + */ + public void setFiscalCode(String value) { + this.fiscalCode = value; + } - /** - * Imposta il valore della proprietà noticeNumber. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setNoticeNumber(String value) { - this.noticeNumber = value; - } + /** + * Recupera il valore della proprietà noticeNumber. + * + * @return possible object is {@link String } + */ + public String getNoticeNumber() { + return noticeNumber; + } + /** + * Imposta il valore della proprietà noticeNumber. + * + * @param value allowed object is {@link String } + */ + public void setNoticeNumber(String value) { + this.noticeNumber = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeRequest.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeRequest.java index efe580b..a142a4a 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeRequest.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeRequest.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; import jakarta.xml.bind.annotation.*; @@ -14,12 +13,11 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per demandPaymentNoticeRequest complex type. - * + * Classe Java per demandPaymentNoticeRequest complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="demandPaymentNoticeRequest">
  *   <complexContent>
@@ -36,178 +34,148 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @Data @AllArgsConstructor @NoArgsConstructor @Builder @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "demandPaymentNoticeRequest", propOrder = { - "idPSP", - "idBrokerPSP", - "idChannel", - "password", - "idSoggettoServizio", - "datiSpecificiServizio" -}) +@XmlType( + name = "demandPaymentNoticeRequest", + propOrder = { + "idPSP", + "idBrokerPSP", + "idChannel", + "password", + "idSoggettoServizio", + "datiSpecificiServizio" + }) @XmlRootElement public class DemandPaymentNoticeRequest { - @XmlElement(required = true) - protected String idPSP; - @XmlElement(required = true) - protected String idBrokerPSP; - @XmlElement(required = true) - protected String idChannel; - @XmlElement(required = true) - protected String password; - @XmlElement(required = true) - protected String idSoggettoServizio; - @XmlElement(required = true) - protected byte[] datiSpecificiServizio; - - /** - * Recupera il valore della proprietà idPSP. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdPSP() { - return idPSP; - } - - /** - * Imposta il valore della proprietà idPSP. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdPSP(String value) { - this.idPSP = value; - } - - /** - * Recupera il valore della proprietà idBrokerPSP. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdBrokerPSP() { - return idBrokerPSP; - } - - /** - * Imposta il valore della proprietà idBrokerPSP. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdBrokerPSP(String value) { - this.idBrokerPSP = value; - } - - /** - * Recupera il valore della proprietà idChannel. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdChannel() { - return idChannel; - } - - /** - * Imposta il valore della proprietà idChannel. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdChannel(String value) { - this.idChannel = value; - } - - /** - * Recupera il valore della proprietà password. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPassword() { - return password; - } - - /** - * Imposta il valore della proprietà password. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPassword(String value) { - this.password = value; - } - - /** - * Recupera il valore della proprietà idSoggettoServizio. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdSoggettoServizio() { - return idSoggettoServizio; - } - - /** - * Imposta il valore della proprietà idSoggettoServizio. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdSoggettoServizio(String value) { - this.idSoggettoServizio = value; - } - - /** - * Recupera il valore della proprietà datiSpecificiServizio. - * - * @return - * possible object is - * byte[] - */ - public byte[] getDatiSpecificiServizio() { - return datiSpecificiServizio; - } - - /** - * Imposta il valore della proprietà datiSpecificiServizio. - * - * @param value - * allowed object is - * byte[] - */ - public void setDatiSpecificiServizio(byte[] value) { - this.datiSpecificiServizio = value; - } - + @XmlElement(required = true) + protected String idPSP; + + @XmlElement(required = true) + protected String idBrokerPSP; + + @XmlElement(required = true) + protected String idChannel; + + @XmlElement(required = true) + protected String password; + + @XmlElement(required = true) + protected String idSoggettoServizio; + + @XmlElement(required = true) + protected byte[] datiSpecificiServizio; + + /** + * Recupera il valore della proprietà idPSP. + * + * @return possible object is {@link String } + */ + public String getIdPSP() { + return idPSP; + } + + /** + * Imposta il valore della proprietà idPSP. + * + * @param value allowed object is {@link String } + */ + public void setIdPSP(String value) { + this.idPSP = value; + } + + /** + * Recupera il valore della proprietà idBrokerPSP. + * + * @return possible object is {@link String } + */ + public String getIdBrokerPSP() { + return idBrokerPSP; + } + + /** + * Imposta il valore della proprietà idBrokerPSP. + * + * @param value allowed object is {@link String } + */ + public void setIdBrokerPSP(String value) { + this.idBrokerPSP = value; + } + + /** + * Recupera il valore della proprietà idChannel. + * + * @return possible object is {@link String } + */ + public String getIdChannel() { + return idChannel; + } + + /** + * Imposta il valore della proprietà idChannel. + * + * @param value allowed object is {@link String } + */ + public void setIdChannel(String value) { + this.idChannel = value; + } + + /** + * Recupera il valore della proprietà password. + * + * @return possible object is {@link String } + */ + public String getPassword() { + return password; + } + + /** + * Imposta il valore della proprietà password. + * + * @param value allowed object is {@link String } + */ + public void setPassword(String value) { + this.password = value; + } + + /** + * Recupera il valore della proprietà idSoggettoServizio. + * + * @return possible object is {@link String } + */ + public String getIdSoggettoServizio() { + return idSoggettoServizio; + } + + /** + * Imposta il valore della proprietà idSoggettoServizio. + * + * @param value allowed object is {@link String } + */ + public void setIdSoggettoServizio(String value) { + this.idSoggettoServizio = value; + } + + /** + * Recupera il valore della proprietà datiSpecificiServizio. + * + * @return possible object is byte[] + */ + public byte[] getDatiSpecificiServizio() { + return datiSpecificiServizio; + } + + /** + * Imposta il valore della proprietà datiSpecificiServizio. + * + * @param value allowed object is byte[] + */ + public void setDatiSpecificiServizio(byte[] value) { + this.datiSpecificiServizio = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeResponse.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeResponse.java index 903e848..306af7b 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeResponse.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/DemandPaymentNoticeResponse.java @@ -1,28 +1,24 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; -import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtFaultBean; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtResponse; -import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.StOutcome; import jakarta.xml.bind.annotation.*; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per demandPaymentNoticeResponse complex type. - * + * Classe Java per demandPaymentNoticeResponse complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="demandPaymentNoticeResponse">
  *   <complexContent>
@@ -39,174 +35,135 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "demandPaymentNoticeResponse", propOrder = { - "qrCode", - "paymentList", - "paymentDescription", - "fiscalCodePA", - "companyName", - "officeName" -}) +@XmlType( + name = "demandPaymentNoticeResponse", + propOrder = { + "qrCode", + "paymentList", + "paymentDescription", + "fiscalCodePA", + "companyName", + "officeName" + }) @AllArgsConstructor @NoArgsConstructor @Data @Builder -public class DemandPaymentNoticeResponse - extends CtResponse -{ - protected CtQrCode qrCode; - protected CtPaymentOptionsDescriptionList paymentList; - protected String paymentDescription; - protected String fiscalCodePA; - protected String companyName; - protected String officeName; - - /** - * Recupera il valore della proprietà qrCode. - * - * @return - * possible object is - * {@link CtQrCode } - * - */ - public CtQrCode getQrCode() { - return qrCode; - } - - /** - * Imposta il valore della proprietà qrCode. - * - * @param value - * allowed object is - * {@link CtQrCode } - * - */ - public void setQrCode(CtQrCode value) { - this.qrCode = value; - } - - /** - * Recupera il valore della proprietà paymentList. - * - * @return - * possible object is - * {@link CtPaymentOptionsDescriptionList } - * - */ - public CtPaymentOptionsDescriptionList getPaymentList() { - return paymentList; - } - - /** - * Imposta il valore della proprietà paymentList. - * - * @param value - * allowed object is - * {@link CtPaymentOptionsDescriptionList } - * - */ - public void setPaymentList(CtPaymentOptionsDescriptionList value) { - this.paymentList = value; - } - - /** - * Recupera il valore della proprietà paymentDescription. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPaymentDescription() { - return paymentDescription; - } - - /** - * Imposta il valore della proprietà paymentDescription. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPaymentDescription(String value) { - this.paymentDescription = value; - } - - /** - * Recupera il valore della proprietà fiscalCodePA. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFiscalCodePA() { - return fiscalCodePA; - } - - /** - * Imposta il valore della proprietà fiscalCodePA. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFiscalCodePA(String value) { - this.fiscalCodePA = value; - } - - /** - * Recupera il valore della proprietà companyName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCompanyName() { - return companyName; - } - - /** - * Imposta il valore della proprietà companyName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCompanyName(String value) { - this.companyName = value; - } - - /** - * Recupera il valore della proprietà officeName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOfficeName() { - return officeName; - } - - /** - * Imposta il valore della proprietà officeName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOfficeName(String value) { - this.officeName = value; - } - +public class DemandPaymentNoticeResponse extends CtResponse { + protected CtQrCode qrCode; + protected CtPaymentOptionsDescriptionList paymentList; + protected String paymentDescription; + protected String fiscalCodePA; + protected String companyName; + protected String officeName; + + /** + * Recupera il valore della proprietà qrCode. + * + * @return possible object is {@link CtQrCode } + */ + public CtQrCode getQrCode() { + return qrCode; + } + + /** + * Imposta il valore della proprietà qrCode. + * + * @param value allowed object is {@link CtQrCode } + */ + public void setQrCode(CtQrCode value) { + this.qrCode = value; + } + + /** + * Recupera il valore della proprietà paymentList. + * + * @return possible object is {@link CtPaymentOptionsDescriptionList } + */ + public CtPaymentOptionsDescriptionList getPaymentList() { + return paymentList; + } + + /** + * Imposta il valore della proprietà paymentList. + * + * @param value allowed object is {@link CtPaymentOptionsDescriptionList } + */ + public void setPaymentList(CtPaymentOptionsDescriptionList value) { + this.paymentList = value; + } + + /** + * Recupera il valore della proprietà paymentDescription. + * + * @return possible object is {@link String } + */ + public String getPaymentDescription() { + return paymentDescription; + } + + /** + * Imposta il valore della proprietà paymentDescription. + * + * @param value allowed object is {@link String } + */ + public void setPaymentDescription(String value) { + this.paymentDescription = value; + } + + /** + * Recupera il valore della proprietà fiscalCodePA. + * + * @return possible object is {@link String } + */ + public String getFiscalCodePA() { + return fiscalCodePA; + } + + /** + * Imposta il valore della proprietà fiscalCodePA. + * + * @param value allowed object is {@link String } + */ + public void setFiscalCodePA(String value) { + this.fiscalCodePA = value; + } + + /** + * Recupera il valore della proprietà companyName. + * + * @return possible object is {@link String } + */ + public String getCompanyName() { + return companyName; + } + + /** + * Imposta il valore della proprietà companyName. + * + * @param value allowed object is {@link String } + */ + public void setCompanyName(String value) { + this.companyName = value; + } + + /** + * Recupera il valore della proprietà officeName. + * + * @return possible object is {@link String } + */ + public String getOfficeName() { + return officeName; + } + + /** + * Imposta il valore della proprietà officeName. + * + * @param value allowed object is {@link String } + */ + public void setOfficeName(String value) { + this.officeName = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/Detail.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/Detail.java index 9c2f4db..f19e5bb 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/Detail.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/Detail.java @@ -1,28 +1,25 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.27 alle 04:50:09 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.27 alle 04:50:09 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; import jakarta.xml.bind.annotation.*; -import org.w3c.dom.Element; - -import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - +import javax.xml.namespace.QName; +import org.w3c.dom.Element; /** - *

Classe Java per detail complex type. - * + * Classe Java per detail complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="detail">
  *   <complexContent>
@@ -35,66 +32,52 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "detail", propOrder = { - "any" -}) +@XmlType( + name = "detail", + propOrder = {"any"}) public class Detail { - @XmlAnyElement(lax = true) - protected List any; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); + @XmlAnyElement(lax = true) + protected List any; - /** - * Gets the value of the any property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the any property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getAny().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link Object } - * - * - */ - public List getAny() { - if (any == null) { - any = new ArrayList(); - } - return this.any; - } + @XmlAnyAttribute private Map otherAttributes = new HashMap(); - /** - * Gets a map that contains attributes that aren't bound to any typed property on this class. - * - *

- * the map is keyed by the name of the attribute and - * the value is the string value of the attribute. - * - * the map returned by this method is live, and you can add new attribute - * by updating the map directly. Because of this design, there's no setter. - * - * - * @return - * always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; + /** + * Gets the value of the any property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the any property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getAny().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link Element } {@link Object } + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); } + return this.any; + } + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

the map is keyed by the name of the attribute and the value is the string value of the + * attribute. + * + *

the map returned by this method is live, and you can add new attribute by updating the map + * directly. Because of this design, there's no setter. + * + * @return always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/FaultBean.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/FaultBean.java index b2e7677..a7bd0c5 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/FaultBean.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/FaultBean.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; import jakarta.xml.bind.annotation.XmlAccessType; @@ -13,12 +12,11 @@ import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per faultBean complex type. - * + * Classe Java per faultBean complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="faultBean">
  *   <complexContent>
@@ -37,224 +35,178 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "faultBean", propOrder = { - "faultCode", - "faultString", - "id", - "description", - "serial", - "originalFaultCode", - "originalFaultString", - "originalDescription" -}) +@XmlType( + name = "faultBean", + propOrder = { + "faultCode", + "faultString", + "id", + "description", + "serial", + "originalFaultCode", + "originalFaultString", + "originalDescription" + }) public class FaultBean { - @XmlElement(required = true) - protected String faultCode; - @XmlElement(required = true) - protected String faultString; - @XmlElement(required = true) - protected String id; - protected String description; - protected Integer serial; - protected String originalFaultCode; - protected String originalFaultString; - protected String originalDescription; - - /** - * Recupera il valore della proprietà faultCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultCode() { - return faultCode; - } - - /** - * Imposta il valore della proprietà faultCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultCode(String value) { - this.faultCode = value; - } - - /** - * Recupera il valore della proprietà faultString. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultString() { - return faultString; - } - - /** - * Imposta il valore della proprietà faultString. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultString(String value) { - this.faultString = value; - } - - /** - * Recupera il valore della proprietà id. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Imposta il valore della proprietà id. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Recupera il valore della proprietà description. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Imposta il valore della proprietà description. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Recupera il valore della proprietà serial. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getSerial() { - return serial; - } - - /** - * Imposta il valore della proprietà serial. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setSerial(Integer value) { - this.serial = value; - } - - /** - * Recupera il valore della proprietà originalFaultCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalFaultCode() { - return originalFaultCode; - } - - /** - * Imposta il valore della proprietà originalFaultCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalFaultCode(String value) { - this.originalFaultCode = value; - } - - /** - * Recupera il valore della proprietà originalFaultString. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalFaultString() { - return originalFaultString; - } - - /** - * Imposta il valore della proprietà originalFaultString. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalFaultString(String value) { - this.originalFaultString = value; - } - - /** - * Recupera il valore della proprietà originalDescription. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalDescription() { - return originalDescription; - } - - /** - * Imposta il valore della proprietà originalDescription. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalDescription(String value) { - this.originalDescription = value; - } - + @XmlElement(required = true) + protected String faultCode; + + @XmlElement(required = true) + protected String faultString; + + @XmlElement(required = true) + protected String id; + + protected String description; + protected Integer serial; + protected String originalFaultCode; + protected String originalFaultString; + protected String originalDescription; + + /** + * Recupera il valore della proprietà faultCode. + * + * @return possible object is {@link String } + */ + public String getFaultCode() { + return faultCode; + } + + /** + * Imposta il valore della proprietà faultCode. + * + * @param value allowed object is {@link String } + */ + public void setFaultCode(String value) { + this.faultCode = value; + } + + /** + * Recupera il valore della proprietà faultString. + * + * @return possible object is {@link String } + */ + public String getFaultString() { + return faultString; + } + + /** + * Imposta il valore della proprietà faultString. + * + * @param value allowed object is {@link String } + */ + public void setFaultString(String value) { + this.faultString = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return possible object is {@link String } + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value allowed object is {@link String } + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà description. + * + * @return possible object is {@link String } + */ + public String getDescription() { + return description; + } + + /** + * Imposta il valore della proprietà description. + * + * @param value allowed object is {@link String } + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Recupera il valore della proprietà serial. + * + * @return possible object is {@link Integer } + */ + public Integer getSerial() { + return serial; + } + + /** + * Imposta il valore della proprietà serial. + * + * @param value allowed object is {@link Integer } + */ + public void setSerial(Integer value) { + this.serial = value; + } + + /** + * Recupera il valore della proprietà originalFaultCode. + * + * @return possible object is {@link String } + */ + public String getOriginalFaultCode() { + return originalFaultCode; + } + + /** + * Imposta il valore della proprietà originalFaultCode. + * + * @param value allowed object is {@link String } + */ + public void setOriginalFaultCode(String value) { + this.originalFaultCode = value; + } + + /** + * Recupera il valore della proprietà originalFaultString. + * + * @return possible object is {@link String } + */ + public String getOriginalFaultString() { + return originalFaultString; + } + + /** + * Imposta il valore della proprietà originalFaultString. + * + * @param value allowed object is {@link String } + */ + public void setOriginalFaultString(String value) { + this.originalFaultString = value; + } + + /** + * Recupera il valore della proprietà originalDescription. + * + * @return possible object is {@link String } + */ + public String getOriginalDescription() { + return originalDescription; + } + + /** + * Imposta il valore della proprietà originalDescription. + * + * @param value allowed object is {@link String } + */ + public void setOriginalDescription(String value) { + this.originalDescription = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/ObjectFactory.java index 4676abe..e8fefe8 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/ObjectFactory.java @@ -1,119 +1,102 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; -import javax.xml.namespace.QName; - import jakarta.xml.bind.JAXBElement; import jakarta.xml.bind.annotation.XmlElementDecl; import jakarta.xml.bind.annotation.XmlRegistry; - +import javax.xml.namespace.QName; /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the it.gov.pagopa.pagopa_api.node.nodeforpsp package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * + * This object contains factory methods for each Java content interface and Java element interface + * generated in the it.gov.pagopa.pagopa_api.node.nodeforpsp package. + * + *

An ObjectFactory allows you to programatically construct new instances of the Java + * representation for XML content. The Java representation of XML content can consist of schema + * derived interfaces and classes representing the binding of schema type definitions, element + * declarations and model groups. Factory methods for each of these are provided in this class. */ @XmlRegistry public class ObjectFactory { - private final static QName _DemandPaymentNoticeRequest_QNAME = new QName("http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", "demandPaymentNoticeRequest"); - private final static QName _DemandPaymentNoticeResponse_QNAME = new QName("http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", "demandPaymentNoticeResponse"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.gov.pagopa.pagopa_api.node.nodeforpsp - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link DemandPaymentNoticeRequest } - * - */ - public DemandPaymentNoticeRequest createDemandPaymentNoticeRequest() { - return new DemandPaymentNoticeRequest(); - } - - /** - * Create an instance of {@link DemandPaymentNoticeResponse } - * - */ - public DemandPaymentNoticeResponse createDemandPaymentNoticeResponse() { - return new DemandPaymentNoticeResponse(); - } - - /** - * Create an instance of {@link FaultBean } - * - */ - public FaultBean createFaultBean() { - return new FaultBean(); - } - - /** - * Create an instance of {@link CtQrCode } - * - */ - public CtQrCode createCtQrCode() { - return new CtQrCode(); - } - - /** - * Create an instance of {@link CtPaymentOptionDescription } - * - */ - public CtPaymentOptionDescription createCtPaymentOptionDescription() { - return new CtPaymentOptionDescription(); - } - - /** - * Create an instance of {@link CtPaymentOptionsDescriptionList } - * - */ - public CtPaymentOptionsDescriptionList createCtPaymentOptionsDescriptionList() { - return new CtPaymentOptionsDescriptionList(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeRequest }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeRequest }{@code >} - */ - @XmlElementDecl(namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", name = "demandPaymentNoticeRequest") - public JAXBElement createDemandPaymentNoticeRequest(DemandPaymentNoticeRequest value) { - return new JAXBElement(_DemandPaymentNoticeRequest_QNAME, DemandPaymentNoticeRequest.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeResponse }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeResponse }{@code >} - */ - @XmlElementDecl(namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", name = "demandPaymentNoticeResponse") - public JAXBElement createDemandPaymentNoticeResponse(DemandPaymentNoticeResponse value) { - return new JAXBElement(_DemandPaymentNoticeResponse_QNAME, DemandPaymentNoticeResponse.class, null, value); - } - + private static final QName _DemandPaymentNoticeRequest_QNAME = + new QName( + "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", "demandPaymentNoticeRequest"); + private static final QName _DemandPaymentNoticeResponse_QNAME = + new QName( + "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", "demandPaymentNoticeResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes + * for package: it.gov.pagopa.pagopa_api.node.nodeforpsp + */ + public ObjectFactory() {} + + /** Create an instance of {@link DemandPaymentNoticeRequest } */ + public DemandPaymentNoticeRequest createDemandPaymentNoticeRequest() { + return new DemandPaymentNoticeRequest(); + } + + /** Create an instance of {@link DemandPaymentNoticeResponse } */ + public DemandPaymentNoticeResponse createDemandPaymentNoticeResponse() { + return new DemandPaymentNoticeResponse(); + } + + /** Create an instance of {@link FaultBean } */ + public FaultBean createFaultBean() { + return new FaultBean(); + } + + /** Create an instance of {@link CtQrCode } */ + public CtQrCode createCtQrCode() { + return new CtQrCode(); + } + + /** Create an instance of {@link CtPaymentOptionDescription } */ + public CtPaymentOptionDescription createCtPaymentOptionDescription() { + return new CtPaymentOptionDescription(); + } + + /** Create an instance of {@link CtPaymentOptionsDescriptionList } */ + public CtPaymentOptionsDescriptionList createCtPaymentOptionsDescriptionList() { + return new CtPaymentOptionsDescriptionList(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeRequest }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeRequest + * }{@code >} + */ + @XmlElementDecl( + namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", + name = "demandPaymentNoticeRequest") + public JAXBElement createDemandPaymentNoticeRequest( + DemandPaymentNoticeRequest value) { + return new JAXBElement( + _DemandPaymentNoticeRequest_QNAME, DemandPaymentNoticeRequest.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeResponse }{@code + * >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link DemandPaymentNoticeResponse + * }{@code >} + */ + @XmlElementDecl( + namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd", + name = "demandPaymentNoticeResponse") + public JAXBElement createDemandPaymentNoticeResponse( + DemandPaymentNoticeResponse value) { + return new JAXBElement( + _DemandPaymentNoticeResponse_QNAME, DemandPaymentNoticeResponse.class, null, value); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/StAmountOptionPSP.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/StAmountOptionPSP.java index 362a4e6..b07a093 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/StAmountOptionPSP.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/StAmountOptionPSP.java @@ -1,21 +1,20 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; import jakarta.xml.bind.annotation.XmlEnum; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per stAmountOptionPSP. - * + * Classe Java per stAmountOptionPSP. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * *

  * <simpleType name="stAmountOptionPSP">
  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
@@ -26,23 +25,20 @@
  *   </restriction>
  * </simpleType>
  * 
- * */ @XmlType(name = "stAmountOptionPSP") @XmlEnum public enum StAmountOptionPSP { - - EQ, - LS, - GT, - ANY; - - public String value() { - return name(); - } - - public static StAmountOptionPSP fromValue(String v) { - return valueOf(v); - } - + EQ, + LS, + GT, + ANY; + + public String value() { + return name(); + } + + public static StAmountOptionPSP fromValue(String v) { + return valueOf(v); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/package-info.java index 547c362..616015a 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/package-info.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/nodeforpsp/package-info.java @@ -1,9 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // -@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") +@jakarta.xml.bind.annotation.XmlSchema( + namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") package it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp; diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java index d441397..9cfd1cb 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtEntityUniqueIdentifier.java @@ -10,10 +10,10 @@ import jakarta.xml.bind.annotation.*; /** - *

Classe Java per ctEntityUniqueIdentifier complex type. - * + * Classe Java per ctEntityUniqueIdentifier complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctEntityUniqueIdentifier">
  *   <complexContent>
@@ -26,68 +26,53 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctEntityUniqueIdentifier", propOrder = { - "entityUniqueIdentifierType", - "entityUniqueIdentifierValue" -}) +@XmlType( + name = "ctEntityUniqueIdentifier", + propOrder = {"entityUniqueIdentifierType", "entityUniqueIdentifierValue"}) public class CtEntityUniqueIdentifier { - @XmlElement(required = true) - @XmlSchemaType(name = "string") - protected StEntityUniqueIdentifierType entityUniqueIdentifierType; - @XmlElement(required = true) - protected String entityUniqueIdentifierValue; + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StEntityUniqueIdentifierType entityUniqueIdentifierType; - /** - * Recupera il valore della proprietà entityUniqueIdentifierType. - * - * @return - * possible object is - * {@link StEntityUniqueIdentifierType } - * - */ - public StEntityUniqueIdentifierType getEntityUniqueIdentifierType() { - return entityUniqueIdentifierType; - } + @XmlElement(required = true) + protected String entityUniqueIdentifierValue; - /** - * Imposta il valore della proprietà entityUniqueIdentifierType. - * - * @param value - * allowed object is - * {@link StEntityUniqueIdentifierType } - * - */ - public void setEntityUniqueIdentifierType(StEntityUniqueIdentifierType value) { - this.entityUniqueIdentifierType = value; - } + /** + * Recupera il valore della proprietà entityUniqueIdentifierType. + * + * @return possible object is {@link StEntityUniqueIdentifierType } + */ + public StEntityUniqueIdentifierType getEntityUniqueIdentifierType() { + return entityUniqueIdentifierType; + } - /** - * Recupera il valore della proprietà entityUniqueIdentifierValue. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEntityUniqueIdentifierValue() { - return entityUniqueIdentifierValue; - } + /** + * Imposta il valore della proprietà entityUniqueIdentifierType. + * + * @param value allowed object is {@link StEntityUniqueIdentifierType } + */ + public void setEntityUniqueIdentifierType(StEntityUniqueIdentifierType value) { + this.entityUniqueIdentifierType = value; + } - /** - * Imposta il valore della proprietà entityUniqueIdentifierValue. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEntityUniqueIdentifierValue(String value) { - this.entityUniqueIdentifierValue = value; - } + /** + * Recupera il valore della proprietà entityUniqueIdentifierValue. + * + * @return possible object is {@link String } + */ + public String getEntityUniqueIdentifierValue() { + return entityUniqueIdentifierValue; + } + /** + * Imposta il valore della proprietà entityUniqueIdentifierValue. + * + * @param value allowed object is {@link String } + */ + public void setEntityUniqueIdentifierValue(String value) { + this.entityUniqueIdentifierValue = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java index c9005f9..52779aa 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtReceiptV2.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtMetadata; @@ -19,10 +18,10 @@ import lombok.NoArgsConstructor; /** - *

Classe Java per ctReceiptV2 complex type. - * + * Classe Java per ctReceiptV2 complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctReceiptV2">
  *   <complexContent>
diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java
index a1aea4a..424218a 100644
--- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java
+++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtSubject.java
@@ -1,11 +1,10 @@
 //
-// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 
-// Vedere https://eclipse-ee4j.github.io/jaxb-ri 
-// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. 
-// Generato il: 2024.12.18 alle 10:59:02 AM CET 
+// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0
+// Vedere https://eclipse-ee4j.github.io/jaxb-ri
+// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine.
+// Generato il: 2024.12.18 alle 10:59:02 AM CET
 //
 
-
 package it.gov.pagopa.mbd.service.model.xml.node.pafornode;
 
 import jakarta.xml.bind.annotation.XmlAccessType;
@@ -13,12 +12,11 @@
 import jakarta.xml.bind.annotation.XmlElement;
 import jakarta.xml.bind.annotation.XmlType;
 
-
 /**
- * 

Classe Java per ctSubject complex type. - * + * Classe Java per ctSubject complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctSubject">
  *   <complexContent>
@@ -38,250 +36,198 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctSubject", propOrder = { - "uniqueIdentifier", - "fullName", - "streetName", - "civicNumber", - "postalCode", - "city", - "stateProvinceRegion", - "country", - "eMail" -}) +@XmlType( + name = "ctSubject", + propOrder = { + "uniqueIdentifier", + "fullName", + "streetName", + "civicNumber", + "postalCode", + "city", + "stateProvinceRegion", + "country", + "eMail" + }) public class CtSubject { - @XmlElement(required = true) - protected CtEntityUniqueIdentifier uniqueIdentifier; - @XmlElement(required = true) - protected String fullName; - protected String streetName; - protected String civicNumber; - protected String postalCode; - protected String city; - protected String stateProvinceRegion; - protected String country; - @XmlElement(name = "e-mail") - protected String eMail; - - /** - * Recupera il valore della proprietà uniqueIdentifier. - * - * @return - * possible object is - * {@link CtEntityUniqueIdentifier } - * - */ - public CtEntityUniqueIdentifier getUniqueIdentifier() { - return uniqueIdentifier; - } - - /** - * Imposta il valore della proprietà uniqueIdentifier. - * - * @param value - * allowed object is - * {@link CtEntityUniqueIdentifier } - * - */ - public void setUniqueIdentifier(CtEntityUniqueIdentifier value) { - this.uniqueIdentifier = value; - } - - /** - * Recupera il valore della proprietà fullName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFullName() { - return fullName; - } - - /** - * Imposta il valore della proprietà fullName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFullName(String value) { - this.fullName = value; - } - - /** - * Recupera il valore della proprietà streetName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStreetName() { - return streetName; - } - - /** - * Imposta il valore della proprietà streetName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStreetName(String value) { - this.streetName = value; - } - - /** - * Recupera il valore della proprietà civicNumber. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCivicNumber() { - return civicNumber; - } - - /** - * Imposta il valore della proprietà civicNumber. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCivicNumber(String value) { - this.civicNumber = value; - } - - /** - * Recupera il valore della proprietà postalCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPostalCode() { - return postalCode; - } - - /** - * Imposta il valore della proprietà postalCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPostalCode(String value) { - this.postalCode = value; - } - - /** - * Recupera il valore della proprietà city. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Imposta il valore della proprietà city. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Recupera il valore della proprietà stateProvinceRegion. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStateProvinceRegion() { - return stateProvinceRegion; - } - - /** - * Imposta il valore della proprietà stateProvinceRegion. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStateProvinceRegion(String value) { - this.stateProvinceRegion = value; - } - - /** - * Recupera il valore della proprietà country. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCountry() { - return country; - } - - /** - * Imposta il valore della proprietà country. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCountry(String value) { - this.country = value; - } - - /** - * Recupera il valore della proprietà eMail. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEMail() { - return eMail; - } - - /** - * Imposta il valore della proprietà eMail. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEMail(String value) { - this.eMail = value; - } - + @XmlElement(required = true) + protected CtEntityUniqueIdentifier uniqueIdentifier; + + @XmlElement(required = true) + protected String fullName; + + protected String streetName; + protected String civicNumber; + protected String postalCode; + protected String city; + protected String stateProvinceRegion; + protected String country; + + @XmlElement(name = "e-mail") + protected String eMail; + + /** + * Recupera il valore della proprietà uniqueIdentifier. + * + * @return possible object is {@link CtEntityUniqueIdentifier } + */ + public CtEntityUniqueIdentifier getUniqueIdentifier() { + return uniqueIdentifier; + } + + /** + * Imposta il valore della proprietà uniqueIdentifier. + * + * @param value allowed object is {@link CtEntityUniqueIdentifier } + */ + public void setUniqueIdentifier(CtEntityUniqueIdentifier value) { + this.uniqueIdentifier = value; + } + + /** + * Recupera il valore della proprietà fullName. + * + * @return possible object is {@link String } + */ + public String getFullName() { + return fullName; + } + + /** + * Imposta il valore della proprietà fullName. + * + * @param value allowed object is {@link String } + */ + public void setFullName(String value) { + this.fullName = value; + } + + /** + * Recupera il valore della proprietà streetName. + * + * @return possible object is {@link String } + */ + public String getStreetName() { + return streetName; + } + + /** + * Imposta il valore della proprietà streetName. + * + * @param value allowed object is {@link String } + */ + public void setStreetName(String value) { + this.streetName = value; + } + + /** + * Recupera il valore della proprietà civicNumber. + * + * @return possible object is {@link String } + */ + public String getCivicNumber() { + return civicNumber; + } + + /** + * Imposta il valore della proprietà civicNumber. + * + * @param value allowed object is {@link String } + */ + public void setCivicNumber(String value) { + this.civicNumber = value; + } + + /** + * Recupera il valore della proprietà postalCode. + * + * @return possible object is {@link String } + */ + public String getPostalCode() { + return postalCode; + } + + /** + * Imposta il valore della proprietà postalCode. + * + * @param value allowed object is {@link String } + */ + public void setPostalCode(String value) { + this.postalCode = value; + } + + /** + * Recupera il valore della proprietà city. + * + * @return possible object is {@link String } + */ + public String getCity() { + return city; + } + + /** + * Imposta il valore della proprietà city. + * + * @param value allowed object is {@link String } + */ + public void setCity(String value) { + this.city = value; + } + + /** + * Recupera il valore della proprietà stateProvinceRegion. + * + * @return possible object is {@link String } + */ + public String getStateProvinceRegion() { + return stateProvinceRegion; + } + + /** + * Imposta il valore della proprietà stateProvinceRegion. + * + * @param value allowed object is {@link String } + */ + public void setStateProvinceRegion(String value) { + this.stateProvinceRegion = value; + } + + /** + * Recupera il valore della proprietà country. + * + * @return possible object is {@link String } + */ + public String getCountry() { + return country; + } + + /** + * Imposta il valore della proprietà country. + * + * @param value allowed object is {@link String } + */ + public void setCountry(String value) { + this.country = value; + } + + /** + * Recupera il valore della proprietà eMail. + * + * @return possible object is {@link String } + */ + public String getEMail() { + return eMail; + } + + /** + * Imposta il valore della proprietà eMail. + * + * @param value allowed object is {@link String } + */ + public void setEMail(String value) { + this.eMail = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java index cb613e0..ba777de 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferListPAReceiptV2.java @@ -1,31 +1,28 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.ArrayList; -import java.util.List; - - /** - *

Classe Java per ctTransferListPAReceiptV2 complex type. - * + * Classe Java per ctTransferListPAReceiptV2 complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctTransferListPAReceiptV2">
  *   <complexContent>
@@ -37,49 +34,39 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctTransferListPAReceiptV2", propOrder = { - "transfer" -}) +@XmlType( + name = "ctTransferListPAReceiptV2", + propOrder = {"transfer"}) @AllArgsConstructor @NoArgsConstructor @Data @Builder public class CtTransferListPAReceiptV2 { - @XmlElement(required = true) - protected List transfer; + @XmlElement(required = true) + protected List transfer; - /** - * Gets the value of the transfer property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the transfer property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getTransfer().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link CtTransferPAReceiptV2 } - * - * - */ - public List getTransfer() { - if (transfer == null) { - transfer = new ArrayList(); - } - return this.transfer; + /** + * Gets the value of the transfer property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the transfer property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getTransfer().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link CtTransferPAReceiptV2 } + */ + public List getTransfer() { + if (transfer == null) { + transfer = new ArrayList(); } - + return this.transfer; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java index a1f9634..98ec449 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/CtTransferPAReceiptV2.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0.CtMetadata; @@ -13,19 +12,17 @@ import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; +import java.math.BigDecimal; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.math.BigDecimal; - - /** - *

Classe Java per ctTransferPAReceiptV2 complex type. - * + * Classe Java per ctTransferPAReceiptV2 complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctTransferPAReceiptV2">
  *   <complexContent>
@@ -47,247 +44,202 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctTransferPAReceiptV2", propOrder = { - "idTransfer", - "transferAmount", - "fiscalCodePA", - "companyName", - "iban", - "mbdAttachment", - "remittanceInformation", - "transferCategory", - "metadata" -}) +@XmlType( + name = "ctTransferPAReceiptV2", + propOrder = { + "idTransfer", + "transferAmount", + "fiscalCodePA", + "companyName", + "iban", + "mbdAttachment", + "remittanceInformation", + "transferCategory", + "metadata" + }) @AllArgsConstructor @NoArgsConstructor @Data @Builder public class CtTransferPAReceiptV2 { - protected int idTransfer; - @XmlElement(required = true) - protected BigDecimal transferAmount; - @XmlElement(required = true) - protected String fiscalCodePA; - protected String companyName; - @XmlElement(name = "IBAN") - protected String iban; - @XmlElement(name = "MBDAttachment") - protected byte[] mbdAttachment; - @XmlElement(required = true) - protected String remittanceInformation; - @XmlElement(required = true) - protected String transferCategory; - protected CtMetadata metadata; - - /** - * Recupera il valore della proprietà idTransfer. - * - */ - public int getIdTransfer() { - return idTransfer; - } - - /** - * Imposta il valore della proprietà idTransfer. - * - */ - public void setIdTransfer(int value) { - this.idTransfer = value; - } - - /** - * Recupera il valore della proprietà transferAmount. - * - * @return - * possible object is - * {@link BigDecimal } - * - */ - public BigDecimal getTransferAmount() { - return transferAmount; - } - - /** - * Imposta il valore della proprietà transferAmount. - * - * @param value - * allowed object is - * {@link BigDecimal } - * - */ - public void setTransferAmount(BigDecimal value) { - this.transferAmount = value; - } - - /** - * Recupera il valore della proprietà fiscalCodePA. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFiscalCodePA() { - return fiscalCodePA; - } - - /** - * Imposta il valore della proprietà fiscalCodePA. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFiscalCodePA(String value) { - this.fiscalCodePA = value; - } - - /** - * Recupera il valore della proprietà companyName. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCompanyName() { - return companyName; - } - - /** - * Imposta il valore della proprietà companyName. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCompanyName(String value) { - this.companyName = value; - } - - /** - * Recupera il valore della proprietà iban. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIBAN() { - return iban; - } - - /** - * Imposta il valore della proprietà iban. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIBAN(String value) { - this.iban = value; - } - - /** - * Recupera il valore della proprietà mbdAttachment. - * - * @return - * possible object is - * byte[] - */ - public byte[] getMBDAttachment() { - return mbdAttachment; - } - - /** - * Imposta il valore della proprietà mbdAttachment. - * - * @param value - * allowed object is - * byte[] - */ - public void setMBDAttachment(byte[] value) { - this.mbdAttachment = value; - } - - /** - * Recupera il valore della proprietà remittanceInformation. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRemittanceInformation() { - return remittanceInformation; - } - - /** - * Imposta il valore della proprietà remittanceInformation. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRemittanceInformation(String value) { - this.remittanceInformation = value; - } - - /** - * Recupera il valore della proprietà transferCategory. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTransferCategory() { - return transferCategory; - } - - /** - * Imposta il valore della proprietà transferCategory. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTransferCategory(String value) { - this.transferCategory = value; - } - - /** - * Recupera il valore della proprietà metadata. - * - * @return - * possible object is - * {@link CtMetadata } - * - */ - public CtMetadata getMetadata() { - return metadata; - } - - /** - * Imposta il valore della proprietà metadata. - * - * @param value - * allowed object is - * {@link CtMetadata } - * - */ - public void setMetadata(CtMetadata value) { - this.metadata = value; - } - + protected int idTransfer; + + @XmlElement(required = true) + protected BigDecimal transferAmount; + + @XmlElement(required = true) + protected String fiscalCodePA; + + protected String companyName; + + @XmlElement(name = "IBAN") + protected String iban; + + @XmlElement(name = "MBDAttachment") + protected byte[] mbdAttachment; + + @XmlElement(required = true) + protected String remittanceInformation; + + @XmlElement(required = true) + protected String transferCategory; + + protected CtMetadata metadata; + + /** Recupera il valore della proprietà idTransfer. */ + public int getIdTransfer() { + return idTransfer; + } + + /** Imposta il valore della proprietà idTransfer. */ + public void setIdTransfer(int value) { + this.idTransfer = value; + } + + /** + * Recupera il valore della proprietà transferAmount. + * + * @return possible object is {@link BigDecimal } + */ + public BigDecimal getTransferAmount() { + return transferAmount; + } + + /** + * Imposta il valore della proprietà transferAmount. + * + * @param value allowed object is {@link BigDecimal } + */ + public void setTransferAmount(BigDecimal value) { + this.transferAmount = value; + } + + /** + * Recupera il valore della proprietà fiscalCodePA. + * + * @return possible object is {@link String } + */ + public String getFiscalCodePA() { + return fiscalCodePA; + } + + /** + * Imposta il valore della proprietà fiscalCodePA. + * + * @param value allowed object is {@link String } + */ + public void setFiscalCodePA(String value) { + this.fiscalCodePA = value; + } + + /** + * Recupera il valore della proprietà companyName. + * + * @return possible object is {@link String } + */ + public String getCompanyName() { + return companyName; + } + + /** + * Imposta il valore della proprietà companyName. + * + * @param value allowed object is {@link String } + */ + public void setCompanyName(String value) { + this.companyName = value; + } + + /** + * Recupera il valore della proprietà iban. + * + * @return possible object is {@link String } + */ + public String getIBAN() { + return iban; + } + + /** + * Imposta il valore della proprietà iban. + * + * @param value allowed object is {@link String } + */ + public void setIBAN(String value) { + this.iban = value; + } + + /** + * Recupera il valore della proprietà mbdAttachment. + * + * @return possible object is byte[] + */ + public byte[] getMBDAttachment() { + return mbdAttachment; + } + + /** + * Imposta il valore della proprietà mbdAttachment. + * + * @param value allowed object is byte[] + */ + public void setMBDAttachment(byte[] value) { + this.mbdAttachment = value; + } + + /** + * Recupera il valore della proprietà remittanceInformation. + * + * @return possible object is {@link String } + */ + public String getRemittanceInformation() { + return remittanceInformation; + } + + /** + * Imposta il valore della proprietà remittanceInformation. + * + * @param value allowed object is {@link String } + */ + public void setRemittanceInformation(String value) { + this.remittanceInformation = value; + } + + /** + * Recupera il valore della proprietà transferCategory. + * + * @return possible object is {@link String } + */ + public String getTransferCategory() { + return transferCategory; + } + + /** + * Imposta il valore della proprietà transferCategory. + * + * @param value allowed object is {@link String } + */ + public void setTransferCategory(String value) { + this.transferCategory = value; + } + + /** + * Recupera il valore della proprietà metadata. + * + * @return possible object is {@link CtMetadata } + */ + public CtMetadata getMetadata() { + return metadata; + } + + /** + * Imposta il valore della proprietà metadata. + * + * @param value allowed object is {@link CtMetadata } + */ + public void setMetadata(CtMetadata value) { + this.metadata = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java index 27e78fd..cbb22b9 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/ObjectFactory.java @@ -1,87 +1,59 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import jakarta.xml.bind.annotation.XmlRegistry; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the it.gov.pagopa.pagopa_api.pa.pafornode package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * + * This object contains factory methods for each Java content interface and Java element interface + * generated in the it.gov.pagopa.pagopa_api.pa.pafornode package. + * + *

An ObjectFactory allows you to programatically construct new instances of the Java + * representation for XML content. The Java representation of XML content can consist of schema + * derived interfaces and classes representing the binding of schema type definitions, element + * declarations and model groups. Factory methods for each of these are provided in this class. */ @XmlRegistry public class ObjectFactory { - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.gov.pagopa.pagopa_api.pa.pafornode - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link CtTransferPAReceiptV2 } - * - */ - public CtTransferPAReceiptV2 createCtTransferPAReceiptV2() { - return new CtTransferPAReceiptV2(); - } - - /** - * Create an instance of {@link PaSendRTV2Request } - * - */ - public PaSendRTV2Request createPaSendRTV2Request() { - return new PaSendRTV2Request(); - } - - /** - * Create an instance of {@link CtReceiptV2 } - * - */ - public CtReceiptV2 createCtReceiptV2() { - return new CtReceiptV2(); - } - - /** - * Create an instance of {@link CtSubject } - * - */ - public CtSubject createCtSubject() { - return new CtSubject(); - } - - /** - * Create an instance of {@link CtEntityUniqueIdentifier } - * - */ - public CtEntityUniqueIdentifier createCtEntityUniqueIdentifier() { - return new CtEntityUniqueIdentifier(); - } - - /** - * Create an instance of {@link CtTransferListPAReceiptV2 } - * - */ - public CtTransferListPAReceiptV2 createCtTransferListPAReceiptV2() { - return new CtTransferListPAReceiptV2(); - } - + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes + * for package: it.gov.pagopa.pagopa_api.pa.pafornode + */ + public ObjectFactory() {} + + /** Create an instance of {@link CtTransferPAReceiptV2 } */ + public CtTransferPAReceiptV2 createCtTransferPAReceiptV2() { + return new CtTransferPAReceiptV2(); + } + + /** Create an instance of {@link PaSendRTV2Request } */ + public PaSendRTV2Request createPaSendRTV2Request() { + return new PaSendRTV2Request(); + } + + /** Create an instance of {@link CtReceiptV2 } */ + public CtReceiptV2 createCtReceiptV2() { + return new CtReceiptV2(); + } + + /** Create an instance of {@link CtSubject } */ + public CtSubject createCtSubject() { + return new CtSubject(); + } + + /** Create an instance of {@link CtEntityUniqueIdentifier } */ + public CtEntityUniqueIdentifier createCtEntityUniqueIdentifier() { + return new CtEntityUniqueIdentifier(); + } + + /** Create an instance of {@link CtTransferListPAReceiptV2 } */ + public CtTransferListPAReceiptV2 createCtTransferListPAReceiptV2() { + return new CtTransferListPAReceiptV2(); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java index c058369..9a41256 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/PaSendRTV2Request.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import jakarta.xml.bind.annotation.XmlAccessType; @@ -17,12 +16,11 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per paSendRTV2Request complex type. - * + * Classe Java per paSendRTV2Request complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="paSendRTV2Request">
  *   <complexContent>
@@ -37,54 +35,37 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "paSendRTV2Request", propOrder = { - "idPA", - "idBrokerPA", - "idStation", - "receipt" -}) +@XmlType( + name = "paSendRTV2Request", + propOrder = {"idPA", "idBrokerPA", "idStation", "receipt"}) @AllArgsConstructor @NoArgsConstructor @Builder @Data public class PaSendRTV2Request { - @XmlElement(required = true) - protected String idPA; - @XmlElement(required = true) - protected String idBrokerPA; - @XmlElement(required = true) - protected String idStation; - @XmlElement(required = true) - protected CtReceiptV2 receipt; + @XmlElement(required = true) + protected String idPA; + + @XmlElement(required = true) + protected String idBrokerPA; - /** - * Recupera il valore della proprietà idPA. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIdPA() { - return idPA; - } + @XmlElement(required = true) + protected String idStation; - /** - * Imposta il valore della proprietà idPA. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIdPA(String value) { - this.idPA = value; - } + @XmlElement(required = true) + protected CtReceiptV2 receipt; + + /** + * Recupera il valore della proprietà idPA. + * + * @return possible object is {@link String } + */ + public String getIdPA() { + return idPA; + } /** * Imposta il valore della proprietà idPA. @@ -139,13 +120,4 @@ public CtReceiptV2 getReceipt() { public void setReceipt(CtReceiptV2 value) { this.receipt = value; } - - /** - * Imposta il valore della proprietà receipt. - * - * @param value allowed object is {@link CtReceiptV2 } - */ - public void setReceipt(CtReceiptV2 value) { - this.receipt = value; - } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java index f747699..e8a3f6e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/StEntityUniqueIdentifierType.java @@ -1,21 +1,20 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // - package it.gov.pagopa.mbd.service.model.xml.node.pafornode; import jakarta.xml.bind.annotation.XmlEnum; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per stEntityUniqueIdentifierType. - * + * Classe Java per stEntityUniqueIdentifierType. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * *

  * <simpleType name="stEntityUniqueIdentifierType">
  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
@@ -25,21 +24,18 @@
  *   </restriction>
  * </simpleType>
  * 
- * */ @XmlType(name = "stEntityUniqueIdentifierType") @XmlEnum public enum StEntityUniqueIdentifierType { + F, + G; - F, - G; - - public String value() { - return name(); - } - - public static StEntityUniqueIdentifierType fromValue(String v) { - return valueOf(v); - } + public String value() { + return name(); + } + public static StEntityUniqueIdentifierType fromValue(String v) { + return valueOf(v); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java index 4a3a74e..58fbe69 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/pafornode/package-info.java @@ -1,9 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.12.18 alle 10:59:02 AM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.12.18 alle 10:59:02 AM CET // -@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd") +@jakarta.xml.bind.annotation.XmlSchema( + namespace = "http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd") package it.gov.pagopa.mbd.service.model.xml.node.pafornode; diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Body.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Body.java index 84a90d7..72de9eb 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Body.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Body.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. // Generato il: 2024.11.27 alle 04:50:09 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeRequest; @@ -19,9 +18,8 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per Body complex type. + * Classe Java per Body complex type. * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * @@ -36,24 +34,26 @@ * </complexContent> * </complexType> *

- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Body", propOrder = { - "demandPaymentNoticeRequest", - "demandPaymentNoticeResponse" -}) +@XmlType( + name = "Body", + propOrder = {"demandPaymentNoticeRequest", "demandPaymentNoticeResponse"}) @AllArgsConstructor @NoArgsConstructor @Data @Builder public class Body { - @XmlElement(name = "demandPaymentNoticeRequest", required = false, namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") - protected DemandPaymentNoticeRequest demandPaymentNoticeRequest; - - @XmlElement(name = "demandPaymentNoticeResponse", required = false, namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") - protected DemandPaymentNoticeResponse demandPaymentNoticeResponse; - + @XmlElement( + name = "demandPaymentNoticeRequest", + required = false, + namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") + protected DemandPaymentNoticeRequest demandPaymentNoticeRequest; + + @XmlElement( + name = "demandPaymentNoticeResponse", + required = false, + namespace = "http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd") + protected DemandPaymentNoticeResponse demandPaymentNoticeResponse; } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Detail.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Detail.java index bf60418..ea9e28b 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Detail.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Detail.java @@ -1,28 +1,25 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import jakarta.xml.bind.annotation.*; -import org.w3c.dom.Element; - -import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - +import javax.xml.namespace.QName; +import org.w3c.dom.Element; /** - *

Classe Java per detail complex type. - * + * Classe Java per detail complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="detail">
  *   <complexContent>
@@ -35,66 +32,52 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "detail", propOrder = { - "any" -}) +@XmlType( + name = "detail", + propOrder = {"any"}) public class Detail { - @XmlAnyElement(lax = true) - protected List any; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); + @XmlAnyElement(lax = true) + protected List any; - /** - * Gets the value of the any property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the any property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getAny().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link Object } - * - * - */ - public List getAny() { - if (any == null) { - any = new ArrayList(); - } - return this.any; - } + @XmlAnyAttribute private Map otherAttributes = new HashMap(); - /** - * Gets a map that contains attributes that aren't bound to any typed property on this class. - * - *

- * the map is keyed by the name of the attribute and - * the value is the string value of the attribute. - * - * the map returned by this method is live, and you can add new attribute - * by updating the map directly. Because of this design, there's no setter. - * - * - * @return - * always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; + /** + * Gets the value of the any property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the any property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getAny().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link Element } {@link Object } + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); } + return this.any; + } + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

the map is keyed by the name of the attribute and the value is the string value of the + * attribute. + * + *

the map returned by this method is live, and you can add new attribute by updating the map + * directly. Because of this design, there's no setter. + * + * @return always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Envelope.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Envelope.java index c44f756..00d15ef 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Envelope.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Envelope.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import jakarta.xml.bind.annotation.*; @@ -14,12 +13,11 @@ import lombok.Data; import lombok.NoArgsConstructor; - /** - *

Classe Java per Envelope complex type. - * + * Classe Java per Envelope complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="Envelope">
  *   <complexContent>
@@ -32,37 +30,35 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Envelope", propOrder = { - "body", -}) +@XmlType( + name = "Envelope", + propOrder = { + "body", + }) @AllArgsConstructor @NoArgsConstructor @Builder @Data public class Envelope { - @XmlElement(name = "Body", namespace = "http://schemas.xmlsoap.org/soap/envelope/", required = true) - protected Body body; - - public Body getBody() { - return body; - } - - /** - * Imposta il valore della proprietà body. - * - * @param value - * allowed object is - * {@link Body } - * - */ - public void setBody(Body value) { - this.body = value; - } + @XmlElement( + name = "Body", + namespace = "http://schemas.xmlsoap.org/soap/envelope/", + required = true) + protected Body body; + public Body getBody() { + return body; + } + /** + * Imposta il valore della proprietà body. + * + * @param value allowed object is {@link Body } + */ + public void setBody(Body value) { + this.body = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Fault.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Fault.java index 304f7e0..5a6b70b 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Fault.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Fault.java @@ -1,23 +1,20 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import jakarta.xml.bind.annotation.*; - import javax.xml.namespace.QName; - /** - *

Classe Java per Fault complex type. - * + * Classe Java per Fault complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="Fault">
  *   <complexContent>
@@ -32,120 +29,93 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Fault", propOrder = { - "faultcode", - "faultstring", - "faultactor", - "detail" -}) +@XmlType( + name = "Fault", + propOrder = {"faultcode", "faultstring", "faultactor", "detail"}) public class Fault { - @XmlElement(required = true) - protected QName faultcode; - @XmlElement(required = true) - protected String faultstring; - @XmlSchemaType(name = "anyURI") - protected String faultactor; - protected Detail detail; - - /** - * Recupera il valore della proprietà faultcode. - * - * @return - * possible object is - * {@link QName } - * - */ - public QName getFaultcode() { - return faultcode; - } - - /** - * Imposta il valore della proprietà faultcode. - * - * @param value - * allowed object is - * {@link QName } - * - */ - public void setFaultcode(QName value) { - this.faultcode = value; - } - - /** - * Recupera il valore della proprietà faultstring. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultstring() { - return faultstring; - } - - /** - * Imposta il valore della proprietà faultstring. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultstring(String value) { - this.faultstring = value; - } - - /** - * Recupera il valore della proprietà faultactor. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultactor() { - return faultactor; - } - - /** - * Imposta il valore della proprietà faultactor. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultactor(String value) { - this.faultactor = value; - } - - /** - * Recupera il valore della proprietà detail. - * - * @return - * possible object is - * {@link Detail } - * - */ - public Detail getDetail() { - return detail; - } - - /** - * Imposta il valore della proprietà detail. - * - * @param value - * allowed object is - * {@link Detail } - * - */ - public void setDetail(Detail value) { - this.detail = value; - } - + @XmlElement(required = true) + protected QName faultcode; + + @XmlElement(required = true) + protected String faultstring; + + @XmlSchemaType(name = "anyURI") + protected String faultactor; + + protected Detail detail; + + /** + * Recupera il valore della proprietà faultcode. + * + * @return possible object is {@link QName } + */ + public QName getFaultcode() { + return faultcode; + } + + /** + * Imposta il valore della proprietà faultcode. + * + * @param value allowed object is {@link QName } + */ + public void setFaultcode(QName value) { + this.faultcode = value; + } + + /** + * Recupera il valore della proprietà faultstring. + * + * @return possible object is {@link String } + */ + public String getFaultstring() { + return faultstring; + } + + /** + * Imposta il valore della proprietà faultstring. + * + * @param value allowed object is {@link String } + */ + public void setFaultstring(String value) { + this.faultstring = value; + } + + /** + * Recupera il valore della proprietà faultactor. + * + * @return possible object is {@link String } + */ + public String getFaultactor() { + return faultactor; + } + + /** + * Imposta il valore della proprietà faultactor. + * + * @param value allowed object is {@link String } + */ + public void setFaultactor(String value) { + this.faultactor = value; + } + + /** + * Recupera il valore della proprietà detail. + * + * @return possible object is {@link Detail } + */ + public Detail getDetail() { + return detail; + } + + /** + * Imposta il valore della proprietà detail. + * + * @param value allowed object is {@link Detail } + */ + public void setDetail(Detail value) { + this.detail = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Header.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Header.java index 0967424..1ae7b9e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Header.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/Header.java @@ -1,28 +1,25 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import jakarta.xml.bind.annotation.*; -import org.w3c.dom.Element; - -import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - +import javax.xml.namespace.QName; +import org.w3c.dom.Element; /** - *

Classe Java per Header complex type. - * + * Classe Java per Header complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="Header">
  *   <complexContent>
@@ -35,66 +32,52 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Header", propOrder = { - "any" -}) +@XmlType( + name = "Header", + propOrder = {"any"}) public class Header { - @XmlAnyElement(lax = true) - protected List any; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); + @XmlAnyElement(lax = true) + protected List any; - /** - * Gets the value of the any property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the any property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getAny().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link Object } - * - * - */ - public List getAny() { - if (any == null) { - any = new ArrayList(); - } - return this.any; - } + @XmlAnyAttribute private Map otherAttributes = new HashMap(); - /** - * Gets a map that contains attributes that aren't bound to any typed property on this class. - * - *

- * the map is keyed by the name of the attribute and - * the value is the string value of the attribute. - * - * the map returned by this method is live, and you can add new attribute - * by updating the map directly. Because of this design, there's no setter. - * - * - * @return - * always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; + /** + * Gets the value of the any property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the any property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getAny().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link Element } {@link Object } + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); } + return this.any; + } + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

the map is keyed by the name of the attribute and the value is the string value of the + * attribute. + * + *

the map returned by this method is live, and you can add new attribute by updating the map + * directly. Because of this design, there's no setter. + * + * @return always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/ObjectFactory.java index 1b9b2ad..f66430c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/ObjectFactory.java @@ -1,139 +1,110 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // - package it.gov.pagopa.mbd.service.model.xml.node.soap.envelope; import jakarta.xml.bind.JAXBElement; import jakarta.xml.bind.annotation.XmlElementDecl; import jakarta.xml.bind.annotation.XmlRegistry; - import javax.xml.namespace.QName; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the org.xmlsoap.schemas.soap.envelope package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * + * This object contains factory methods for each Java content interface and Java element interface + * generated in the org.xmlsoap.schemas.soap.envelope package. + * + *

An ObjectFactory allows you to programatically construct new instances of the Java + * representation for XML content. The Java representation of XML content can consist of schema + * derived interfaces and classes representing the binding of schema type definitions, element + * declarations and model groups. Factory methods for each of these are provided in this class. */ @XmlRegistry public class ObjectFactory { - private final static QName _Envelope_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Envelope"); - private final static QName _Header_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Header"); - private final static QName _Body_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body"); - private final static QName _Fault_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Fault"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.xmlsoap.schemas.soap.envelope - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Envelope } - * - */ - public Envelope createEnvelope() { - return new Envelope(); - } - - /** - * Create an instance of {@link Header } - * - */ - public Header createHeader() { - return new Header(); - } - - /** - * Create an instance of {@link Body } - * - */ - public Body createBody() { - return new Body(); - } - - /** - * Create an instance of {@link Fault } - * - */ - public Fault createFault() { - return new Fault(); - } - - /** - * Create an instance of {@link Detail } - * - */ - public Detail createDetail() { - return new Detail(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Envelope }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link Envelope }{@code >} - */ - @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Envelope") - public JAXBElement createEnvelope(Envelope value) { - return new JAXBElement(_Envelope_QNAME, Envelope.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Header }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link Header }{@code >} - */ - @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Header") - public JAXBElement

createHeader(Header value) { - return new JAXBElement
(_Header_QNAME, Header.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Body }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link Body }{@code >} - */ - @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Body") - public JAXBElement createBody(Body value) { - return new JAXBElement(_Body_QNAME, Body.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Fault }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link Fault }{@code >} - */ - @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Fault") - public JAXBElement createFault(Fault value) { - return new JAXBElement(_Fault_QNAME, Fault.class, null, value); - } - + private static final QName _Envelope_QNAME = + new QName("http://schemas.xmlsoap.org/soap/envelope/", "Envelope"); + private static final QName _Header_QNAME = + new QName("http://schemas.xmlsoap.org/soap/envelope/", "Header"); + private static final QName _Body_QNAME = + new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body"); + private static final QName _Fault_QNAME = + new QName("http://schemas.xmlsoap.org/soap/envelope/", "Fault"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes + * for package: org.xmlsoap.schemas.soap.envelope + */ + public ObjectFactory() {} + + /** Create an instance of {@link Envelope } */ + public Envelope createEnvelope() { + return new Envelope(); + } + + /** Create an instance of {@link Header } */ + public Header createHeader() { + return new Header(); + } + + /** Create an instance of {@link Body } */ + public Body createBody() { + return new Body(); + } + + /** Create an instance of {@link Fault } */ + public Fault createFault() { + return new Fault(); + } + + /** Create an instance of {@link Detail } */ + public Detail createDetail() { + return new Detail(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Envelope }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link Envelope }{@code >} + */ + @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Envelope") + public JAXBElement createEnvelope(Envelope value) { + return new JAXBElement(_Envelope_QNAME, Envelope.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Header }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link Header }{@code >} + */ + @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Header") + public JAXBElement
createHeader(Header value) { + return new JAXBElement
(_Header_QNAME, Header.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Body }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link Body }{@code >} + */ + @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Body") + public JAXBElement createBody(Body value) { + return new JAXBElement(_Body_QNAME, Body.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Fault }{@code >} + * + * @param value Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement }{@code <}{@link Fault }{@code >} + */ + @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Fault") + public JAXBElement createFault(Fault value) { + return new JAXBElement(_Fault_QNAME, Fault.class, null, value); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/package-info.java index 257bd36..65c718c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/package-info.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/node/soap/envelope/package-info.java @@ -1,8 +1,8 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.28 alle 03:55:01 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.28 alle 03:55:01 PM CET // @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://schemas.xmlsoap.org/soap/envelope/") diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtFaultBean.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtFaultBean.java index 4d788e1..79e16c8 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtFaultBean.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtFaultBean.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlAccessType; @@ -13,12 +12,11 @@ import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per ctFaultBean complex type. - * + * Classe Java per ctFaultBean complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctFaultBean">
  *   <complexContent>
@@ -37,224 +35,178 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctFaultBean", propOrder = { - "faultCode", - "faultString", - "id", - "description", - "serial", - "originalFaultCode", - "originalFaultString", - "originalDescription" -}) +@XmlType( + name = "ctFaultBean", + propOrder = { + "faultCode", + "faultString", + "id", + "description", + "serial", + "originalFaultCode", + "originalFaultString", + "originalDescription" + }) public class CtFaultBean { - @XmlElement(required = true) - protected String faultCode; - @XmlElement(required = true) - protected String faultString; - @XmlElement(required = true) - protected String id; - protected String description; - protected Integer serial; - protected String originalFaultCode; - protected String originalFaultString; - protected String originalDescription; - - /** - * Recupera il valore della proprietà faultCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultCode() { - return faultCode; - } - - /** - * Imposta il valore della proprietà faultCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultCode(String value) { - this.faultCode = value; - } - - /** - * Recupera il valore della proprietà faultString. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFaultString() { - return faultString; - } - - /** - * Imposta il valore della proprietà faultString. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFaultString(String value) { - this.faultString = value; - } - - /** - * Recupera il valore della proprietà id. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Imposta il valore della proprietà id. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Recupera il valore della proprietà description. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Imposta il valore della proprietà description. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Recupera il valore della proprietà serial. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getSerial() { - return serial; - } - - /** - * Imposta il valore della proprietà serial. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setSerial(Integer value) { - this.serial = value; - } - - /** - * Recupera il valore della proprietà originalFaultCode. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalFaultCode() { - return originalFaultCode; - } - - /** - * Imposta il valore della proprietà originalFaultCode. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalFaultCode(String value) { - this.originalFaultCode = value; - } - - /** - * Recupera il valore della proprietà originalFaultString. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalFaultString() { - return originalFaultString; - } - - /** - * Imposta il valore della proprietà originalFaultString. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalFaultString(String value) { - this.originalFaultString = value; - } - - /** - * Recupera il valore della proprietà originalDescription. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOriginalDescription() { - return originalDescription; - } - - /** - * Imposta il valore della proprietà originalDescription. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOriginalDescription(String value) { - this.originalDescription = value; - } - + @XmlElement(required = true) + protected String faultCode; + + @XmlElement(required = true) + protected String faultString; + + @XmlElement(required = true) + protected String id; + + protected String description; + protected Integer serial; + protected String originalFaultCode; + protected String originalFaultString; + protected String originalDescription; + + /** + * Recupera il valore della proprietà faultCode. + * + * @return possible object is {@link String } + */ + public String getFaultCode() { + return faultCode; + } + + /** + * Imposta il valore della proprietà faultCode. + * + * @param value allowed object is {@link String } + */ + public void setFaultCode(String value) { + this.faultCode = value; + } + + /** + * Recupera il valore della proprietà faultString. + * + * @return possible object is {@link String } + */ + public String getFaultString() { + return faultString; + } + + /** + * Imposta il valore della proprietà faultString. + * + * @param value allowed object is {@link String } + */ + public void setFaultString(String value) { + this.faultString = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return possible object is {@link String } + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value allowed object is {@link String } + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà description. + * + * @return possible object is {@link String } + */ + public String getDescription() { + return description; + } + + /** + * Imposta il valore della proprietà description. + * + * @param value allowed object is {@link String } + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Recupera il valore della proprietà serial. + * + * @return possible object is {@link Integer } + */ + public Integer getSerial() { + return serial; + } + + /** + * Imposta il valore della proprietà serial. + * + * @param value allowed object is {@link Integer } + */ + public void setSerial(Integer value) { + this.serial = value; + } + + /** + * Recupera il valore della proprietà originalFaultCode. + * + * @return possible object is {@link String } + */ + public String getOriginalFaultCode() { + return originalFaultCode; + } + + /** + * Imposta il valore della proprietà originalFaultCode. + * + * @param value allowed object is {@link String } + */ + public void setOriginalFaultCode(String value) { + this.originalFaultCode = value; + } + + /** + * Recupera il valore della proprietà originalFaultString. + * + * @return possible object is {@link String } + */ + public String getOriginalFaultString() { + return originalFaultString; + } + + /** + * Imposta il valore della proprietà originalFaultString. + * + * @param value allowed object is {@link String } + */ + public void setOriginalFaultString(String value) { + this.originalFaultString = value; + } + + /** + * Recupera il valore della proprietà originalDescription. + * + * @return possible object is {@link String } + */ + public String getOriginalDescription() { + return originalDescription; + } + + /** + * Imposta il valore della proprietà originalDescription. + * + * @param value allowed object is {@link String } + */ + public void setOriginalDescription(String value) { + this.originalDescription = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMapEntry.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMapEntry.java index 2a8e23a..4587e3e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMapEntry.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMapEntry.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlAccessType; @@ -13,12 +12,11 @@ import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per ctMapEntry complex type. - * + * Classe Java per ctMapEntry complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctMapEntry">
  *   <complexContent>
@@ -31,67 +29,52 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctMapEntry", propOrder = { - "key", - "value" -}) +@XmlType( + name = "ctMapEntry", + propOrder = {"key", "value"}) public class CtMapEntry { - @XmlElement(required = true) - protected String key; - @XmlElement(required = true) - protected String value; + @XmlElement(required = true) + protected String key; - /** - * Recupera il valore della proprietà key. - * - * @return - * possible object is - * {@link String } - * - */ - public String getKey() { - return key; - } + @XmlElement(required = true) + protected String value; - /** - * Imposta il valore della proprietà key. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setKey(String value) { - this.key = value; - } + /** + * Recupera il valore della proprietà key. + * + * @return possible object is {@link String } + */ + public String getKey() { + return key; + } - /** - * Recupera il valore della proprietà value. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } + /** + * Imposta il valore della proprietà key. + * + * @param value allowed object is {@link String } + */ + public void setKey(String value) { + this.key = value; + } - /** - * Imposta il valore della proprietà value. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } + /** + * Recupera il valore della proprietà value. + * + * @return possible object is {@link String } + */ + public String getValue() { + return value; + } + /** + * Imposta il valore della proprietà value. + * + * @param value allowed object is {@link String } + */ + public void setValue(String value) { + this.value = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMetadata.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMetadata.java index 1c6f524..84bb3db 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMetadata.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtMetadata.java @@ -1,26 +1,24 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; -import java.util.ArrayList; -import java.util.List; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; - +import java.util.ArrayList; +import java.util.List; /** - *

Classe Java per ctMetadata complex type. - * + * Classe Java per ctMetadata complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctMetadata">
  *   <complexContent>
@@ -32,45 +30,35 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctMetadata", propOrder = { - "mapEntry" -}) +@XmlType( + name = "ctMetadata", + propOrder = {"mapEntry"}) public class CtMetadata { - @XmlElement(required = true) - protected List mapEntry; + @XmlElement(required = true) + protected List mapEntry; - /** - * Gets the value of the mapEntry property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the Jakarta XML Binding object. - * This is why there is not a set method for the mapEntry property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getMapEntry().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link CtMapEntry } - * - * - */ - public List getMapEntry() { - if (mapEntry == null) { - mapEntry = new ArrayList(); - } - return this.mapEntry; + /** + * Gets the value of the mapEntry property. + * + *

This accessor method returns a reference to the live list, not a snapshot. Therefore any + * modification you make to the returned list will be present inside the Jakarta XML Binding + * object. This is why there is not a set method for the mapEntry property. + * + *

For example, to add a new item, do as follows: + * + *

+   *    getMapEntry().add(newItem);
+   * 
+ * + *

Objects of the following type(s) are allowed in the list {@link CtMapEntry } + */ + public List getMapEntry() { + if (mapEntry == null) { + mapEntry = new ArrayList(); } - + return this.mapEntry; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtResponse.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtResponse.java index 7ff471c..090347c 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtResponse.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtResponse.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeResponse; @@ -15,17 +14,12 @@ import jakarta.xml.bind.annotation.XmlSchemaType; import jakarta.xml.bind.annotation.XmlSeeAlso; import jakarta.xml.bind.annotation.XmlType; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - /** - *

Classe Java per ctResponse complex type. - * + * Classe Java per ctResponse complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctResponse">
  *   <complexContent>
@@ -38,70 +32,53 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctResponse", propOrder = { - "outcome", - "fault" -}) -@XmlSeeAlso({ - DemandPaymentNoticeResponse.class -}) +@XmlType( + name = "ctResponse", + propOrder = {"outcome", "fault"}) +@XmlSeeAlso({DemandPaymentNoticeResponse.class}) public class CtResponse { - @XmlElement(required = true) - @XmlSchemaType(name = "string") - protected StOutcome outcome; - protected CtFaultBean fault; + @XmlElement(required = true) + @XmlSchemaType(name = "string") + protected StOutcome outcome; - /** - * Recupera il valore della proprietà outcome. - * - * @return - * possible object is - * {@link StOutcome } - * - */ - public StOutcome getOutcome() { - return outcome; - } + protected CtFaultBean fault; - /** - * Imposta il valore della proprietà outcome. - * - * @param value - * allowed object is - * {@link StOutcome } - * - */ - public void setOutcome(StOutcome value) { - this.outcome = value; - } + /** + * Recupera il valore della proprietà outcome. + * + * @return possible object is {@link StOutcome } + */ + public StOutcome getOutcome() { + return outcome; + } - /** - * Recupera il valore della proprietà fault. - * - * @return - * possible object is - * {@link CtFaultBean } - * - */ - public CtFaultBean getFault() { - return fault; - } + /** + * Imposta il valore della proprietà outcome. + * + * @param value allowed object is {@link StOutcome } + */ + public void setOutcome(StOutcome value) { + this.outcome = value; + } - /** - * Imposta il valore della proprietà fault. - * - * @param value - * allowed object is - * {@link CtFaultBean } - * - */ - public void setFault(CtFaultBean value) { - this.fault = value; - } + /** + * Recupera il valore della proprietà fault. + * + * @return possible object is {@link CtFaultBean } + */ + public CtFaultBean getFault() { + return fault; + } + /** + * Imposta il valore della proprietà fault. + * + * @param value allowed object is {@link CtFaultBean } + */ + public void setFault(CtFaultBean value) { + this.fault = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRichiestaMarcaDaBollo.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRichiestaMarcaDaBollo.java index 31d3438..fb01c4e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRichiestaMarcaDaBollo.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRichiestaMarcaDaBollo.java @@ -1,11 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlAccessType; @@ -13,12 +12,11 @@ import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per ctRichiestaMarcaDaBollo complex type. - * + * Classe Java per ctRichiestaMarcaDaBollo complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctRichiestaMarcaDaBollo">
  *   <complexContent>
@@ -32,92 +30,73 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctRichiestaMarcaDaBollo", propOrder = { - "hashDocumento", - "tipoBollo", - "provinciaResidenza" -}) +@XmlType( + name = "ctRichiestaMarcaDaBollo", + propOrder = {"hashDocumento", "tipoBollo", "provinciaResidenza"}) public class CtRichiestaMarcaDaBollo { - @XmlElement(required = true) - protected byte[] hashDocumento; - @XmlElement(required = true) - protected String tipoBollo; - @XmlElement(required = true) - protected String provinciaResidenza; + @XmlElement(required = true) + protected byte[] hashDocumento; + + @XmlElement(required = true) + protected String tipoBollo; - /** - * Recupera il valore della proprietà hashDocumento. - * - * @return - * possible object is - * byte[] - */ - public byte[] getHashDocumento() { - return hashDocumento; - } + @XmlElement(required = true) + protected String provinciaResidenza; - /** - * Imposta il valore della proprietà hashDocumento. - * - * @param value - * allowed object is - * byte[] - */ - public void setHashDocumento(byte[] value) { - this.hashDocumento = value; - } + /** + * Recupera il valore della proprietà hashDocumento. + * + * @return possible object is byte[] + */ + public byte[] getHashDocumento() { + return hashDocumento; + } - /** - * Recupera il valore della proprietà tipoBollo. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTipoBollo() { - return tipoBollo; - } + /** + * Imposta il valore della proprietà hashDocumento. + * + * @param value allowed object is byte[] + */ + public void setHashDocumento(byte[] value) { + this.hashDocumento = value; + } - /** - * Imposta il valore della proprietà tipoBollo. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTipoBollo(String value) { - this.tipoBollo = value; - } + /** + * Recupera il valore della proprietà tipoBollo. + * + * @return possible object is {@link String } + */ + public String getTipoBollo() { + return tipoBollo; + } - /** - * Recupera il valore della proprietà provinciaResidenza. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProvinciaResidenza() { - return provinciaResidenza; - } + /** + * Imposta il valore della proprietà tipoBollo. + * + * @param value allowed object is {@link String } + */ + public void setTipoBollo(String value) { + this.tipoBollo = value; + } - /** - * Imposta il valore della proprietà provinciaResidenza. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProvinciaResidenza(String value) { - this.provinciaResidenza = value; - } + /** + * Recupera il valore della proprietà provinciaResidenza. + * + * @return possible object is {@link String } + */ + public String getProvinciaResidenza() { + return provinciaResidenza; + } + /** + * Imposta il valore della proprietà provinciaResidenza. + * + * @param value allowed object is {@link String } + */ + public void setProvinciaResidenza(String value) { + this.provinciaResidenza = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRisposta.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRisposta.java index 4c49c92..a6ed155 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRisposta.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/CtRisposta.java @@ -1,23 +1,21 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per ctRisposta complex type. - * + * Classe Java per ctRisposta complex type. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. - * + * *

  * <complexType name="ctRisposta">
  *   <complexContent>
@@ -29,39 +27,30 @@
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ctRisposta", propOrder = { - "fault" -}) +@XmlType( + name = "ctRisposta", + propOrder = {"fault"}) public class CtRisposta { - protected CtFaultBean fault; - - /** - * Recupera il valore della proprietà fault. - * - * @return - * possible object is - * {@link CtFaultBean } - * - */ - public CtFaultBean getFault() { - return fault; - } - - /** - * Imposta il valore della proprietà fault. - * - * @param value - * allowed object is - * {@link CtFaultBean } - * - */ - public void setFault(CtFaultBean value) { - this.fault = value; - } - + protected CtFaultBean fault; + + /** + * Recupera il valore della proprietà fault. + * + * @return possible object is {@link CtFaultBean } + */ + public CtFaultBean getFault() { + return fault; + } + + /** + * Imposta il valore della proprietà fault. + * + * @param value allowed object is {@link CtFaultBean } + */ + public void setFault(CtFaultBean value) { + this.fault = value; + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/ObjectFactory.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/ObjectFactory.java index 403f6d4..58a1bab 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/ObjectFactory.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/ObjectFactory.java @@ -1,87 +1,59 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlRegistry; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the it.gov.pagopa.pagopa_api.xsd.common_types.v1_0 package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * + * This object contains factory methods for each Java content interface and Java element interface + * generated in the it.gov.pagopa.pagopa_api.xsd.common_types.v1_0 package. + * + *

An ObjectFactory allows you to programatically construct new instances of the Java + * representation for XML content. The Java representation of XML content can consist of schema + * derived interfaces and classes representing the binding of schema type definitions, element + * declarations and model groups. Factory methods for each of these are provided in this class. */ @XmlRegistry public class ObjectFactory { - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.gov.pagopa.pagopa_api.xsd.common_types.v1_0 - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link CtRichiestaMarcaDaBollo } - * - */ - public CtRichiestaMarcaDaBollo createCtRichiestaMarcaDaBollo() { - return new CtRichiestaMarcaDaBollo(); - } - - /** - * Create an instance of {@link CtMapEntry } - * - */ - public CtMapEntry createCtMapEntry() { - return new CtMapEntry(); - } - - /** - * Create an instance of {@link CtMetadata } - * - */ - public CtMetadata createCtMetadata() { - return new CtMetadata(); - } - - /** - * Create an instance of {@link CtFaultBean } - * - */ - public CtFaultBean createCtFaultBean() { - return new CtFaultBean(); - } - - /** - * Create an instance of {@link CtResponse } - * - */ - public CtResponse createCtResponse() { - return new CtResponse(); - } - - /** - * Create an instance of {@link CtRisposta } - * - */ - public CtRisposta createCtRisposta() { - return new CtRisposta(); - } - + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes + * for package: it.gov.pagopa.pagopa_api.xsd.common_types.v1_0 + */ + public ObjectFactory() {} + + /** Create an instance of {@link CtRichiestaMarcaDaBollo } */ + public CtRichiestaMarcaDaBollo createCtRichiestaMarcaDaBollo() { + return new CtRichiestaMarcaDaBollo(); + } + + /** Create an instance of {@link CtMapEntry } */ + public CtMapEntry createCtMapEntry() { + return new CtMapEntry(); + } + + /** Create an instance of {@link CtMetadata } */ + public CtMetadata createCtMetadata() { + return new CtMetadata(); + } + + /** Create an instance of {@link CtFaultBean } */ + public CtFaultBean createCtFaultBean() { + return new CtFaultBean(); + } + + /** Create an instance of {@link CtResponse } */ + public CtResponse createCtResponse() { + return new CtResponse(); + } + + /** Create an instance of {@link CtRisposta } */ + public CtRisposta createCtRisposta() { + return new CtRisposta(); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/StOutcome.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/StOutcome.java index 1d0607d..9a3db6e 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/StOutcome.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/StOutcome.java @@ -1,21 +1,20 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // - package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; import jakarta.xml.bind.annotation.XmlEnum; import jakarta.xml.bind.annotation.XmlType; - /** - *

Classe Java per stOutcome. - * + * Classe Java per stOutcome. + * *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * *

  * <simpleType name="stOutcome">
  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
@@ -24,21 +23,18 @@
  *   </restriction>
  * </simpleType>
  * 
- * */ @XmlType(name = "stOutcome") @XmlEnum public enum StOutcome { + OK, + KO; - OK, - KO; - - public String value() { - return name(); - } - - public static StOutcome fromValue(String v) { - return valueOf(v); - } + public String value() { + return name(); + } + public static StOutcome fromValue(String v) { + return valueOf(v); + } } diff --git a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/package-info.java b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/package-info.java index 6610be2..4cdf9c6 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/package-info.java +++ b/src/main/java/it/gov/pagopa/mbd/service/model/xml/xsd/common_types/v1_0/package-info.java @@ -1,9 +1,10 @@ // -// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 -// Vedere https://eclipse-ee4j.github.io/jaxb-ri -// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. -// Generato il: 2024.11.21 alle 04:46:32 PM CET +// Questo file è stato generato dall'Eclipse Implementation of JAXB, v3.0.0 +// Vedere https://eclipse-ee4j.github.io/jaxb-ri +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2024.11.21 alle 04:46:32 PM CET // -@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/") +@jakarta.xml.bind.annotation.XmlSchema( + namespace = "http://pagopa-api.pagopa.gov.it/xsd/common-types/v1.0.0/") package it.gov.pagopa.mbd.service.model.xml.xsd.common_types.v1_0; diff --git a/src/main/java/it/gov/pagopa/mbd/service/service/MbdService.java b/src/main/java/it/gov/pagopa/mbd/service/service/MbdService.java index 93fe81c..00a37de 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/service/MbdService.java +++ b/src/main/java/it/gov/pagopa/mbd/service/service/MbdService.java @@ -6,8 +6,7 @@ public interface MbdService { - Mono getMbd(String fiscalCodeEC, GetMbdRequest request); - - Mono getPaymentReceipts(String fiscalCode, String nav); + Mono getMbd(String fiscalCodeEC, GetMbdRequest request); + Mono getPaymentReceipts(String fiscalCode, String nav); } diff --git a/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java b/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java index 8137cdd..37ebb72 100644 --- a/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java +++ b/src/main/java/it/gov/pagopa/mbd/service/service/impl/MbdServiceImpl.java @@ -1,5 +1,8 @@ package it.gov.pagopa.mbd.service.service.impl; +import static org.apache.http.HttpHeaders.CONTENT_TYPE; +import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; + import it.gov.pagopa.mbd.service.client.ReactiveClient; import it.gov.pagopa.mbd.service.exception.AppError; import it.gov.pagopa.mbd.service.exception.AppException; @@ -13,126 +16,147 @@ import jakarta.validation.ConstraintViolation; import jakarta.validation.ConstraintViolationException; import jakarta.validation.Validator; +import java.util.HashMap; +import java.util.Set; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.oxm.XmlMappingException; import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.stereotype.Service; import reactor.core.publisher.Mono; -import java.util.HashMap; -import java.util.Set; - -import static org.apache.http.HttpHeaders.CONTENT_TYPE; -import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; - @Service @Slf4j public class MbdServiceImpl implements MbdService { - private final Validator validator; - private final ReactiveClient reactiveSoapClient; - private final Jaxb2Marshaller jaxb2Marshaller; - private final String mdbLinkBaseUrl; - - private final String idPsp; - - private final String idBrokerPsp; - - private final String channelId; + private final Validator validator; + private final ReactiveClient reactiveSoapClient; + private final Jaxb2Marshaller jaxb2Marshaller; + private final String mdbLinkBaseUrl; - @Autowired - public MbdServiceImpl( - Validator validator, ReactiveClient reactiveSoapClient, - Jaxb2Marshaller jaxb2Marshaller, - @Value("${mbd.link.baseUrl}") - String mdbLinkBaseUrl, - @Value("${mbd.mapper.idPsp}") - String idPsp, - @Value("${mbd.mapper.idBrokerPsp}") - String idBrokerPsp, - @Value("${mbd.mapper.channelId}") - String channelId) { - this.validator = validator; - this.reactiveSoapClient = reactiveSoapClient; - this.jaxb2Marshaller = jaxb2Marshaller; - this.mdbLinkBaseUrl = mdbLinkBaseUrl; - this.idPsp = idPsp; - this.idBrokerPsp = idBrokerPsp; - this.channelId = channelId; - } + private final String idPsp; - @Override - public Mono getMbd(String fiscalCodeEC, GetMbdRequest request) { - HashMap hashMap = new HashMap(); - return Mono.just(request) - .doFirst(() -> { - Set> errors = validator.validate(request); - if (!errors.isEmpty()) { - throw new ConstraintViolationException(errors); - } - }) - .onErrorMap(ConstraintViolationException.class, e -> { - log.error("Encountered an error during demandPaymentNotice Validation: {}", e.getMessage()); - return e; - }) - .map(item -> RequestMapper.mapDemandPaymentNoticeRequest(idPsp, idBrokerPsp, channelId, fiscalCodeEC, - jaxb2Marshaller, item)) - .onErrorMap(XmlMappingException.class, e -> { - log.error("Encountered an error during demandPaymentNotice Request Mapping: {}", e.getMessage()); - return new AppException(AppError.PAYMENT_NOTICE_REQUEST_MAP_ERROR, e); - }) - .flatMap(reactiveSoapClient::demandPaymentNotice) - .onErrorMap(WebClientException.class, e -> { - log.error("Encountered an error during demandPaymentNotice Call: {}", e.getMessage()); - return new AppException(AppError.PAYMENT_NOTICE_REQUEST_CALL_ERROR, e); - }) - .map(demandPaymentNoticeResponse -> { - hashMap.put("demandPaymentNoticeResponse", demandPaymentNoticeResponse); - return RequestMapper.mapCartRequest(request, demandPaymentNoticeResponse); - }) - .onErrorMap(CartMappingException.class, e -> { - log.error("Encountered an error during cart mapping: {}", e.getMessage()); - return new AppException(AppError.CART_REQUEST_MAP_ERROR, e); - }) - .flatMap(reactiveSoapClient::getCart) - .onErrorMap(WebClientException.class, e -> { - log.error("Encountered an error during getCart Call: {}", e.getMessage()); - return new AppException(AppError.CART_REQUEST_CALL_ERROR, e); - }) - .map(item -> { - String noticeNumber = hashMap.get("demandPaymentNoticeResponse").getQrCode().getNoticeNumber(); - item.setMbdNav(noticeNumber); - item.setNavDownloadLink(StringUtils.joinWith("/", mdbLinkBaseUrl, - "organizations", fiscalCodeEC, - "receipt", noticeNumber)); - return ResponseEntity.ok().header(CONTENT_TYPE, APPLICATION_JSON_VALUE).body(item); - }); + private final String idBrokerPsp; - } + private final String channelId; - @Override - public Mono getPaymentReceipts(String fiscalCode, String nav) { - return Mono.zip(Mono.just(fiscalCode),Mono.just(nav).map(item -> nav.substring(1))) - .flatMap(tuple -> reactiveSoapClient.getPaymentReceipt(tuple.getT1(),tuple.getT2())) - .onErrorMap(WebClientException.class, e -> { - log.error("Encountered an error during getPaymentReceiptCall Call: {}", e.getMessage()); - return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); - }) - .onErrorMap(IllegalArgumentException.class, e -> { - log.error("Encountered an error extracting receipt content: {}", e.getMessage()); - return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); - }) - .map(item -> ResponseEntity.ok() - .header("Content-Type", APPLICATION_JSON_VALUE) - .body(GetMdbReceipt.builder().content(item.getReceipt().getTransferList() - .getTransfer().get(0).getMBDAttachment()).build())); - } + @Autowired + public MbdServiceImpl( + Validator validator, + ReactiveClient reactiveSoapClient, + Jaxb2Marshaller jaxb2Marshaller, + @Value("${mbd.link.baseUrl}") String mdbLinkBaseUrl, + @Value("${mbd.mapper.idPsp}") String idPsp, + @Value("${mbd.mapper.idBrokerPsp}") String idBrokerPsp, + @Value("${mbd.mapper.channelId}") String channelId) { + this.validator = validator; + this.reactiveSoapClient = reactiveSoapClient; + this.jaxb2Marshaller = jaxb2Marshaller; + this.mdbLinkBaseUrl = mdbLinkBaseUrl; + this.idPsp = idPsp; + this.idBrokerPsp = idBrokerPsp; + this.channelId = channelId; + } + @Override + public Mono getMbd(String fiscalCodeEC, GetMbdRequest request) { + HashMap hashMap = new HashMap(); + return Mono.just(request) + .doFirst( + () -> { + Set> errors = validator.validate(request); + if (!errors.isEmpty()) { + throw new ConstraintViolationException(errors); + } + }) + .onErrorMap( + ConstraintViolationException.class, + e -> { + log.error( + "Encountered an error during demandPaymentNotice Validation: {}", e.getMessage()); + return e; + }) + .map( + item -> + RequestMapper.mapDemandPaymentNoticeRequest( + idPsp, idBrokerPsp, channelId, fiscalCodeEC, jaxb2Marshaller, item)) + .onErrorMap( + XmlMappingException.class, + e -> { + log.error( + "Encountered an error during demandPaymentNotice Request Mapping: {}", + e.getMessage()); + return new AppException(AppError.PAYMENT_NOTICE_REQUEST_MAP_ERROR, e); + }) + .flatMap(reactiveSoapClient::demandPaymentNotice) + .onErrorMap( + WebClientException.class, + e -> { + log.error("Encountered an error during demandPaymentNotice Call: {}", e.getMessage()); + return new AppException(AppError.PAYMENT_NOTICE_REQUEST_CALL_ERROR, e); + }) + .map( + demandPaymentNoticeResponse -> { + hashMap.put("demandPaymentNoticeResponse", demandPaymentNoticeResponse); + return RequestMapper.mapCartRequest(request, demandPaymentNoticeResponse); + }) + .onErrorMap( + CartMappingException.class, + e -> { + log.error("Encountered an error during cart mapping: {}", e.getMessage()); + return new AppException(AppError.CART_REQUEST_MAP_ERROR, e); + }) + .flatMap(reactiveSoapClient::getCart) + .onErrorMap( + WebClientException.class, + e -> { + log.error("Encountered an error during getCart Call: {}", e.getMessage()); + return new AppException(AppError.CART_REQUEST_CALL_ERROR, e); + }) + .map( + item -> { + String noticeNumber = + hashMap.get("demandPaymentNoticeResponse").getQrCode().getNoticeNumber(); + item.setMbdNav(noticeNumber); + item.setNavDownloadLink( + StringUtils.joinWith( + "/", mdbLinkBaseUrl, "organizations", fiscalCodeEC, "receipt", noticeNumber)); + return ResponseEntity.ok().header(CONTENT_TYPE, APPLICATION_JSON_VALUE).body(item); + }); + } + @Override + public Mono getPaymentReceipts(String fiscalCode, String nav) { + return Mono.zip(Mono.just(fiscalCode), Mono.just(nav).map(item -> nav.substring(1))) + .flatMap(tuple -> reactiveSoapClient.getPaymentReceipt(tuple.getT1(), tuple.getT2())) + .onErrorMap( + WebClientException.class, + e -> { + log.error( + "Encountered an error during getPaymentReceiptCall Call: {}", e.getMessage()); + return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); + }) + .onErrorMap( + IllegalArgumentException.class, + e -> { + log.error("Encountered an error extracting receipt content: {}", e.getMessage()); + return new AppException(AppError.PAYMENT_RECEIPTS_CALL_ERROR, e); + }) + .map( + item -> + ResponseEntity.ok() + .header("Content-Type", APPLICATION_JSON_VALUE) + .body( + GetMdbReceipt.builder() + .content( + item.getReceipt() + .getTransferList() + .getTransfer() + .get(0) + .getMBDAttachment()) + .build())); + } } diff --git a/src/test/java/it/gov/pagopa/mbd/service/OpenApiGenerationTest.java b/src/test/java/it/gov/pagopa/mbd/service/OpenApiGenerationTest.java index 6c36034..9ea90b2 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/OpenApiGenerationTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/OpenApiGenerationTest.java @@ -1,5 +1,7 @@ package it.gov.pagopa.mbd.service; +import static org.junit.jupiter.api.Assertions.*; + import com.fasterxml.jackson.databind.ObjectMapper; import java.nio.file.Files; import java.nio.file.Path; @@ -10,11 +12,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.test.web.reactive.server.WebTestClient; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.result.MockMvcResultMatchers; - -import static org.junit.jupiter.api.Assertions.*; @SpringBootTest(classes = Application.class) @AutoConfigureMockMvc @@ -22,31 +19,37 @@ class OpenApiGenerationTest { @Autowired ObjectMapper objectMapper; - @Autowired - private WebTestClient webClient; + @Autowired private WebTestClient webClient; @Test void swaggerSpringPlugin() throws Exception { - webClient.get().uri("/v3/api-docs").accept(MediaType.APPLICATION_JSON).exchange() - .expectStatus().is2xxSuccessful() - .expectBody().consumeWith( + webClient + .get() + .uri("/v3/api-docs") + .accept(MediaType.APPLICATION_JSON) + .exchange() + .expectStatus() + .is2xxSuccessful() + .expectBody() + .consumeWith( (result) -> { - try { - assertNotNull(result); - assertNotNull(result.getResponseBody()); - final String content = new String(result.getResponseBodyContent()); - assertFalse(content.isBlank()); - assertFalse(content.contains("${"), "Generated swagger contains placeholders"); - Object swagger = - objectMapper.readValue(new String(result.getResponseBodyContent()), Object.class); - String formatted = - objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger); - Path basePath = Paths.get("openapi/"); - Files.createDirectories(basePath); - Files.write(basePath.resolve("openapi.json"), formatted.getBytes()); - } catch (Exception e) { - assertTrue(false); - } + try { + assertNotNull(result); + assertNotNull(result.getResponseBody()); + final String content = new String(result.getResponseBodyContent()); + assertFalse(content.isBlank()); + assertFalse(content.contains("${"), "Generated swagger contains placeholders"); + Object swagger = + objectMapper.readValue( + new String(result.getResponseBodyContent()), Object.class); + String formatted = + objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger); + Path basePath = Paths.get("openapi/"); + Files.createDirectories(basePath); + Files.write(basePath.resolve("openapi.json"), formatted.getBytes()); + } catch (Exception e) { + assertTrue(false); + } }); } } diff --git a/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java b/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java index 3d6ca88..57934da 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/client/ReactiveClientTest.java @@ -1,5 +1,12 @@ package it.gov.pagopa.mbd.service.client; +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; +import static org.springframework.http.MediaType.APPLICATION_XML_VALUE; + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.tomakehurst.wiremock.junit5.WireMockExtension; @@ -11,6 +18,8 @@ import it.gov.pagopa.mbd.service.model.xml.node.nodeforpsp.DemandPaymentNoticeResponse; import it.gov.pagopa.mbd.service.model.xml.node.pafornode.PaSendRTV2Request; import jakarta.inject.Inject; +import java.nio.charset.StandardCharsets; +import java.util.Collections; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -18,166 +27,197 @@ import org.springframework.boot.test.context.SpringBootTest; import reactor.core.publisher.Mono; -import java.nio.charset.StandardCharsets; -import java.util.Collections; - -import static com.github.tomakehurst.wiremock.client.WireMock.*; -import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; -import static org.springframework.http.MediaType.APPLICATION_XML_VALUE; - @SpringBootTest class ReactiveClientTest { - @Autowired - ObjectMapper mapper; - - @RegisterExtension - private static final WireMockExtension WIRE_MOCK_EXTENSION = - WireMockExtension.newInstance().options(wireMockConfig().port(8086)).build(); - - @Inject - ReactiveClient reactiveClient; - - @Test - void demandPaymentNoticeShouldReturnOk() { - WIRE_MOCK_EXTENSION.stubFor(post("/demand").withHeader("Content-Type", matching(APPLICATION_XML_VALUE)) - .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_XML_VALUE) - .withBody("\n" + - "\n" + - " \n" + - " \n" + - " OK\n" + - " \n" + - " \n" + - "" - ))); - Mono demandPaymentNoticeResponseMono = reactiveClient.demandPaymentNotice( - DemandPaymentNoticeRequest.builder() - .idPSP("1212") - .idBrokerPSP("121212") - .idChannel("232323") - .password("") - .datiSpecificiServizio("test".getBytes(StandardCharsets.UTF_8)) + @Autowired ObjectMapper mapper; + + @RegisterExtension + private static final WireMockExtension WIRE_MOCK_EXTENSION = + WireMockExtension.newInstance().options(wireMockConfig().port(8086)).build(); + + @Inject ReactiveClient reactiveClient; + + @Test + void demandPaymentNoticeShouldReturnOk() { + WIRE_MOCK_EXTENSION.stubFor( + post("/demand") + .withHeader("Content-Type", matching(APPLICATION_XML_VALUE)) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", APPLICATION_XML_VALUE) + .withBody( + "\n" + + "\n" + + " \n" + + " \n" + + " OK\n" + + " \n" + + " \n" + + ""))); + Mono demandPaymentNoticeResponseMono = + reactiveClient.demandPaymentNotice( + DemandPaymentNoticeRequest.builder() + .idPSP("1212") + .idBrokerPSP("121212") + .idChannel("232323") + .password("") + .datiSpecificiServizio("test".getBytes(StandardCharsets.UTF_8)) .build()); - DemandPaymentNoticeResponse demandPaymentNoticeResponse = demandPaymentNoticeResponseMono.block(); - assertNotNull(demandPaymentNoticeResponse); - } - - @Test - void demandPaymentNoticeShouldReturnKO() { - WIRE_MOCK_EXTENSION.stubFor(post("/demand").withHeader("Content-Type", matching(APPLICATION_XML_VALUE)) - .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_XML_VALUE) - .withBody("\n" + - "\n" + - " \n" + - " \n" + - " KO\n" + - " \n" + - " \n" + - "" - ))); - Mono demandPaymentNoticeResponseMono = reactiveClient.demandPaymentNotice( - DemandPaymentNoticeRequest.builder() + DemandPaymentNoticeResponse demandPaymentNoticeResponse = + demandPaymentNoticeResponseMono.block(); + assertNotNull(demandPaymentNoticeResponse); + } + + @Test + void demandPaymentNoticeShouldReturnKO() { + WIRE_MOCK_EXTENSION.stubFor( + post("/demand") + .withHeader("Content-Type", matching(APPLICATION_XML_VALUE)) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", APPLICATION_XML_VALUE) + .withBody( + "\n" + + "\n" + + " \n" + + " \n" + + " KO\n" + + " \n" + + " \n" + + ""))); + Mono demandPaymentNoticeResponseMono = + reactiveClient.demandPaymentNotice( + DemandPaymentNoticeRequest.builder() .idPSP("1212") .idBrokerPSP("121212") .idChannel("232323") .password("") .datiSpecificiServizio("test".getBytes(StandardCharsets.UTF_8)) .build()); - assertThrows(WebClientException.class, () -> demandPaymentNoticeResponseMono.block()); - } - - @SneakyThrows - @Test - void getCartWithOkResponse() { - WIRE_MOCK_EXTENSION.stubFor(post("/cart").withHeader("Content-Type", matching(APPLICATION_JSON_VALUE)) - .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_JSON_VALUE) - .withBody(mapper.writeValueAsString(GetCartResponse.builder().checkoutRedirectUrl("testUrl").build())))); - Mono getCartResponseMono = reactiveClient.getCart( - GetCartRequest.builder().paymentNotices(Collections.singletonList( - CartPaymentNotice.builder().build())).build()); - GetCartResponse getCartResponse = getCartResponseMono.block(); - assertNotNull(getCartResponse); - } - - - @SneakyThrows - @Test - void getCartWithKOResponse() { - WIRE_MOCK_EXTENSION.stubFor(post("/cart").withHeader("Content-Type", matching(APPLICATION_JSON_VALUE)) - .willReturn(aResponse().withStatus(500).withHeader("Content-Type", APPLICATION_JSON_VALUE))); - Mono getCartResponseMono = reactiveClient.getCart( - GetCartRequest.builder().paymentNotices(Collections.singletonList( - CartPaymentNotice.builder().build())).build()); - assertThrows(WebClientException.class, () -> getCartResponseMono.block()); - } - - - @Test - void getPaymentReceiptWithOk() throws JsonProcessingException { - WIRE_MOCK_EXTENSION.stubFor(get(urlMatching("/receipt/.*")) - .willReturn(aResponse().withStatus(200).withHeader("Content-Type", APPLICATION_XML_VALUE) - .withBody( - "\n" + - "\n" + - " 99999000013\n" + - " 15376371009\n" + - " 15376371009_48\n" + - " \n" + - " 7d7cfaeb94a742bda3c8d389a3259293\n" + - " 348173447377455101\n" + - " 99999000013\n" + - " OK\n" + - " 48173447377455101\n" + - " 16.00\n" + - " Pagamento marca da bollo digitale\n" + - " EC DEMO\n" + - " \n" + - " \n" + - " F\n" + - " ANONIMO\n" + - " \n" + - " ANONIMO\n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " 16.00\n" + - " 99999000013\n" + - " \n" + - " PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWFyY2FEYUJvbGxvIHhtbG5zPSJodHRwOi8vd3d3LmFnZW56aWFlbnRyYXRlLmdvdi5pdC8yMDE0L01hcmNhRGFCb2xsbyIgeG1sbnM6bnMyPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIj48UFNQPjxDb2RpY2VGaXNjYWxlPjAwNzk5OTYwMTU4PC9Db2RpY2VGaXNjYWxlPjxEZW5vbWluYXppb25lPkludGVzYSBTYW5wYW9sbyBTLnAuQS48L0Rlbm9taW5hemlvbmU+PC9QU1A+PElVQkQ+MDEyNDAwMDIxODA2NDY8L0lVQkQ+PE9yYUFjcXVpc3RvPjIwMjQtMDctMDhUMjA6MTg6MDErMDI6MDA8L09yYUFjcXVpc3RvPjxJbXBvcnRvPjE2LjAwPC9JbXBvcnRvPjxUaXBvQm9sbG8+MDE8L1RpcG9Cb2xsbz48SW1wcm9udGFEb2N1bWVudG8+PERpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMDQveG1sZW5jI3NoYTI1NiIvPjxuczI6RGlnZXN0VmFsdWU+MXRyQTVxeWpTWk53aXd0R0c0NmR5alJwTDE2VEZnR0NGdm5mRnpRckZIYkI8L25zMjpEaWdlc3RWYWx1ZT48L0ltcHJvbnRhRG9jdW1lbnRvPjxTaWduYXR1cmUgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxTaWduZWRJbmZvPjxDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tMjAwMTAzMTUiLz48U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPjxSZWZlcmVuY2UgVVJJPSIiPjxUcmFuc2Zvcm1zPjxUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjZW52ZWxvcGVkLXNpZ25hdHVyZSIvPjwvVHJhbnNmb3Jtcz48RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+PERpZ2VzdFZhbHVlPlI4bGZHeUluMFZENCtUV0NSajJKM0pkTkY3MWxDYk9USDNkYVRPVVVGRWs9PC9EaWdlc3RWYWx1ZT48L1JlZmVyZW5jZT48L1NpZ25lZEluZm8+PFNpZ25hdHVyZVZhbHVlPllWbFpLVk90WXRPYjYvamNUSUFCUFpkZThNVE9UZnZXdURSemhhZFY0S2czWHFoU2JBNUhEd042MmNDNEJIL0dzNGpMdHlnSGxzMFVHdXd6RngyUWJnZTU1b1lCZmV6d3RveDVZL0lGNDM2bk5KWkxYNXY0bjJwd1A3Z3ZZYWp2WERKNVdSaEswOXZmblZoRkU1Z2pEOUhGNEVwa3hyaDRkeWpHUU1rN2dCVVdIR0YrN3ZHUzV1U1dxc2RReGVIemhMSnZKMWx6Qi8zVjJsZHR5emd0M2tzd1FHTkUyYmtGWmZWZTFOK0wreTQ1MUpVZWNtK05hdndxbHdscU1KUDU2SnhlTE5JSzZRaVVrWmtMTU9TSW8zT1FIMjM0b3BVOTRtSFhTcUdaMXdmVmVhRVdzUWphY3JwUjBWd0FWV1hNNWttblp5Qy9oMHcyUTlnYUVuUnJpUT09PC9TaWduYXR1cmVWYWx1ZT48S2V5SW5mbz48WDUwOURhdGE+PFg1MDlDZXJ0aWZpY2F0ZT5NSUlFdFRDQ0FwMmdBd0lCQWdJSVZYYXBaMXY4OVlBd0RRWUpLb1pJaHZjTkFRRUxCUUF3YURFTE1Ba0dBMVVFQmhNQ1NWUXhIakFjQmdOVkJBb01GVUZuWlc1NmFXRWdaR1ZzYkdVZ1JXNTBjbUYwWlRFYk1Ca0dBMVVFQ3d3U1UyVnlkbWw2YVNCVVpXeGxiV0YwYVdOcE1Sd3dHZ1lEVlFRRERCTkRRU0JDYjJ4c2J5QlVaV3hsYldGMGFXTnZNQjRYRFRFNU1UQXdNakV6TlRneE4xb1hEVEkxTVRBd01qRXpOVGd4TjFvd1pURUxNQWtHQTFVRUJoTUNTVlF4SGpBY0JnTlZCQW9NRlVGblpXNTZhV0VnWkdWc2JHVWdSVzUwY21GMFpURU1NQW9HQTFVRUN3d0RVRk5RTVNnd0pnWURWUVFEREI4d01EYzVPVGsyTURFMU9DQkpUbFJGVTBFZ1UwRk9VRUZQVEU4Z1UxQkJNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXZLR2d1Q0hwSkJEVVdzUmJZemFMeEg3c3dXM3E0NlRnSitpUDBEYWlXYkkvVEJna0NGUnJ1cE5OeEk2dlI0eFBpUStDYTJ4NEEycVFjYm16eTVTblZ1MGpLeDU2cTlZQ0REYjVRUXZYZHlaUlYraUFwVjhFZ1FiSGJqcW8yTHFRR2NWbWVJNE43b3pDZWQ1cEF6aHdGKytOZkUyWHFpR1pXQ2g1YlhhbkRrM2EveEJ5L2J4WTM0N01GTGtqaE5sZU9vS09jVnRtWmtMbXErU3RJcWJ5VjY2ek9PbXd3UHgzRnhidDkzNGJqRVdSRk5mVktDMTZMZDYwd04wcXk4Z2tuSnRONmg3TWNGbWpHR2tqdWxVMy8rOGxkTjI4dzJ4NWNOZ3dwMmhFY1BwMEJmNmdrU0tRRm9hTjExbzkvd0poSzJFbTZUV3plcWlFQVhVcS9nSHJPUUlEQVFBQm8yWXdaREFmQmdOVkhTTUVHREFXZ0JRcVI3Si9JVXkveTk0SWpkTDRPZXJ2cjk1Q1JEQVNCZ05WSFNBRUN6QUpNQWNHQlN0TUhRRUpNQjBHQTFVZERnUVdCQlFxQnl6UzRTdHZ1QzhjZFdLUnNtK2VZbmdFUERBT0JnTlZIUThCQWY4RUJBTUNCa0F3RFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUFhV3RvbzBHSUlwekJ5ZHluZWMxcFNoUUxkdUZLUEh5cHVTNDFzVEp3YXJJWEV0YzBQc0VydzZaYXpxVGkwak9SQ3gxNVFibzBZbHE0QldFN1pzU1IxNGZnVzlmRU1TSEdRZWF4dDFuNFBlQ1BSN0FKWXdVNkx5azBDYXNTWllaZ0N3RUJMeEJyL2hLR01ya2lrUDJCRm5MbDVUUHBBZlhXWllQTHBhVWE4dC9SSFJtMllmNXhqOStHT0ZLdkJjNmU5bGlFRzQyUGc4d2w3RlZwQUkvV25ESHprTDBCOEtrTDVNOHVzdmlCOEd0dlFHdU0xU1o3Z3NyY29tcTQ4Y1FTQXgvci9Xa1B4NXdzUTlIM0NJTERGRXN5T3YrTTd4S3liN0FSV3l3Sm81QVVOYTRGMEtaYjlZQlJtQ0dqN21iTWpNTG5hbVlKeURtYkoyN0szUitoeHJyY2xjZnVSMjdIWTJkVG11dFRxanJWZmZhM0JqWVZ2bnFCVkdoRUU2WHFTVXF2YlJiTTV1VmFhWHpwWEJPMHlGS1duNGVzQ0hkbVlVWkRtY0FUcTVEMW03aU8rdUN0TVMvQXZMWE82dTljT3JyUVhGaHFFREdCUzcxcCs1VzlJR2Q3ZTJ6NDNJcTdNSm9nT2J1bGxOSHJYNS8yTFlZM0hhbisyZFNYQmxuRkN3ZStsOXNZdGZnMVZWekdlTlh1YTNxc2JLdXMwU3pUZ3NmUmlKY1dZM0t0WFRQemUrYWFwN0J4elY0NXFheDlsalN2dzhQNXNFRUM3R2JzV2tJeGxpU3NMNUV5NWg2ZDNKaTR6K3ltWndvQ2hZY0lRUUcrb05QVjM0TVMzbmVKTHlXYjBIanhtbkZuNk9IQ010OFpzM2tVZDkrMWI3MlAvRVhhM0VHZ2djPC9YNTA5Q2VydGlmaWNhdGU+PFg1MDlDUkw+TUlJQzR6Q0J6QUlCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREJvTVFzd0NRWURWUVFHRXdKSlZERWVNQndHQTFVRUNnd1ZRV2RsYm5wcFlTQmtaV3hzWlNCRmJuUnlZWFJsTVJzd0dRWURWUVFMREJKVFpYSjJhWHBwSUZSbGJHVnRZWFJwWTJreEhEQWFCZ05WQkFNTUUwTkJJRUp2Ykd4dklGUmxiR1Z0WVhScFkyOFhEVEkwTVRJeE56RXpNekkxTWxvWERUSTBNVEl4T0RFek16STFNVnFnTURBdU1COEdBMVVkSXdRWU1CYUFGQ3BIc244aFRML0wzZ2lOMHZnNTZ1K3Yza0pFTUFzR0ExVWRGQVFFQWdJWGZqQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFkMTNsZWF2QXlDc3NabWx0UDg3K0FwV3hESnlta3l5djJvVlVTL0RSclRJeWxmUlJEb2dzNWpZbVRENzA2ZWlLeU5yNzRWU0VFOFkyanVtOEdFckVPdnBjd1JxSzNyRUFjTXExSE81WXZOMnkrRjlVdncwb2ZQZUllU0R0NDVQbEw4WHoydGF4UE5qV3JFMUNFQVUyQ3VHT1ljRlpERVpPRlllcjJ2d2JlTjQ2bUo3aGFjM09zNnRtRWpwVnZya2hjaVk4RlkvdUxNbmZPZE9vam1SU3pUM3Nyek9LbkEyVUxiaHc0VGp0UFBIbFdyd0ZFSFowR1A0eFNZdEoxTnhxeTFtZ21BVW1jd3I5ckI4NElOZmlXUy9ORGlmVmpzYUlNeW9PNG1OTGw0WmdCZUtkUlFIVG9zYUJob29tMitMdjIzNjAybEsvNzVUVE5zblZlb08wUWVMZGpSd2x5citoNDZZLzB3NFRDZmNRMHNpVktGcC8ya1pGZktFOU1YeFlQdmhtQnF4VVJHbHM1L1g4VzVzT2cyUER4M1ViZkdoMi9LODZqRklScmxrQmNISmFjNENiODV3aWQ0bUo3aDNJK2R3dmtUNUxCK2tWcURkMGZuQURxTDEvaGwvT0lhRW1JdzNQanRzSDlwSHQ2UjdzY2lXN242ZmtwSG9ZOXB2dk9wZlhmcGVvTFVMSGpWbUhhUnFkN0dkc21GSjdFbmpYblVOWXJpNDZKYkh0ZUNsM3AvNk9mcFY3NUtjTVNIVGlJYks5SkFITFBGNlpDOUdycEJuT0s2eTBmUTZqWm5yNWNVQ2tESFNMQlprYkx5Kzhzd1liYnI5T2RwbnRlL1JOS1BPQ2VDVmdnQzBhN0VOaXBKeko3K2plaW03cktIKzB0ak1XSExlRUdCND08L1g1MDlDUkw+PC9YNTA5RGF0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9tYXJjYURhQm9sbG8+\n" + - " Pagamento marca da bollo digitale\n" + - " 9/0702103TS/\n" + - " \n" + - " \n" + - " BCITITMM\n" + - " 00799960158\n" + - " Intesa Sanpaolo S.p.A\n" + - " 00799960158_01_ONUS\n" + - " app\n" + - " creditCard\n" + - " 0.50\n" + - " c47c5e72-ec53-4be7-bcbb-ad7554ba13d7\n" + - " 2024-12-17T23:18:16\n" + - " 2024-12-17\n" + - " 2024-12-18\n" + - " \n" + - "" - ))); - Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); - PaSendRTV2Request getResponse = getResponseMono.block(); - assertNotNull(getResponse); - } - - @Test - void getPaymentReceiptWithKO() throws JsonProcessingException { - WIRE_MOCK_EXTENSION.stubFor(get(urlMatching("/receipt/.*")) - .willReturn(aResponse().withStatus(500))); - Mono getResponseMono = reactiveClient.getPaymentReceipt("test","test"); - assertThrows(WebClientException.class, () -> getResponseMono.block()); - } - -} \ No newline at end of file + assertThrows(WebClientException.class, () -> demandPaymentNoticeResponseMono.block()); + } + + @SneakyThrows + @Test + void getCartWithOkResponse() { + WIRE_MOCK_EXTENSION.stubFor( + post("/cart") + .withHeader("Content-Type", matching(APPLICATION_JSON_VALUE)) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", APPLICATION_JSON_VALUE) + .withBody( + mapper.writeValueAsString( + GetCartResponse.builder().checkoutRedirectUrl("testUrl").build())))); + Mono getCartResponseMono = + reactiveClient.getCart( + GetCartRequest.builder() + .paymentNotices(Collections.singletonList(CartPaymentNotice.builder().build())) + .build()); + GetCartResponse getCartResponse = getCartResponseMono.block(); + assertNotNull(getCartResponse); + } + + @SneakyThrows + @Test + void getCartWithKOResponse() { + WIRE_MOCK_EXTENSION.stubFor( + post("/cart") + .withHeader("Content-Type", matching(APPLICATION_JSON_VALUE)) + .willReturn( + aResponse().withStatus(500).withHeader("Content-Type", APPLICATION_JSON_VALUE))); + Mono getCartResponseMono = + reactiveClient.getCart( + GetCartRequest.builder() + .paymentNotices(Collections.singletonList(CartPaymentNotice.builder().build())) + .build()); + assertThrows(WebClientException.class, () -> getCartResponseMono.block()); + } + + @Test + void getPaymentReceiptWithOk() throws JsonProcessingException { + WIRE_MOCK_EXTENSION.stubFor( + get(urlMatching("/receipt/.*")) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", APPLICATION_XML_VALUE) + .withBody( + "\n" + + "\n" + + " 99999000013\n" + + " 15376371009\n" + + " 15376371009_48\n" + + " \n" + + " 7d7cfaeb94a742bda3c8d389a3259293\n" + + " 348173447377455101\n" + + " 99999000013\n" + + " OK\n" + + " " + + " 48173447377455101\n" + + " 16.00\n" + + " Pagamento marca da bollo" + + " digitale\n" + + " EC DEMO\n" + + " \n" + + " \n" + + " " + + " F\n" + + " " + + " ANONIMO\n" + + " \n" + + " ANONIMO\n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 16.00\n" + + " 99999000013\n" + + " \n" + + " " + + " PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWFyY2FEYUJvbGxvIHhtbG5zPSJodHRwOi8vd3d3LmFnZW56aWFlbnRyYXRlLmdvdi5pdC8yMDE0L01hcmNhRGFCb2xsbyIgeG1sbnM6bnMyPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIj48UFNQPjxDb2RpY2VGaXNjYWxlPjAwNzk5OTYwMTU4PC9Db2RpY2VGaXNjYWxlPjxEZW5vbWluYXppb25lPkludGVzYSBTYW5wYW9sbyBTLnAuQS48L0Rlbm9taW5hemlvbmU+PC9QU1A+PElVQkQ+MDEyNDAwMDIxODA2NDY8L0lVQkQ+PE9yYUFjcXVpc3RvPjIwMjQtMDctMDhUMjA6MTg6MDErMDI6MDA8L09yYUFjcXVpc3RvPjxJbXBvcnRvPjE2LjAwPC9JbXBvcnRvPjxUaXBvQm9sbG8+MDE8L1RpcG9Cb2xsbz48SW1wcm9udGFEb2N1bWVudG8+PERpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMDQveG1sZW5jI3NoYTI1NiIvPjxuczI6RGlnZXN0VmFsdWU+MXRyQTVxeWpTWk53aXd0R0c0NmR5alJwTDE2VEZnR0NGdm5mRnpRckZIYkI8L25zMjpEaWdlc3RWYWx1ZT48L0ltcHJvbnRhRG9jdW1lbnRvPjxTaWduYXR1cmUgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxTaWduZWRJbmZvPjxDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tMjAwMTAzMTUiLz48U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPjxSZWZlcmVuY2UgVVJJPSIiPjxUcmFuc2Zvcm1zPjxUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjZW52ZWxvcGVkLXNpZ25hdHVyZSIvPjwvVHJhbnNmb3Jtcz48RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+PERpZ2VzdFZhbHVlPlI4bGZHeUluMFZENCtUV0NSajJKM0pkTkY3MWxDYk9USDNkYVRPVVVGRWs9PC9EaWdlc3RWYWx1ZT48L1JlZmVyZW5jZT48L1NpZ25lZEluZm8+PFNpZ25hdHVyZVZhbHVlPllWbFpLVk90WXRPYjYvamNUSUFCUFpkZThNVE9UZnZXdURSemhhZFY0S2czWHFoU2JBNUhEd042MmNDNEJIL0dzNGpMdHlnSGxzMFVHdXd6RngyUWJnZTU1b1lCZmV6d3RveDVZL0lGNDM2bk5KWkxYNXY0bjJwd1A3Z3ZZYWp2WERKNVdSaEswOXZmblZoRkU1Z2pEOUhGNEVwa3hyaDRkeWpHUU1rN2dCVVdIR0YrN3ZHUzV1U1dxc2RReGVIemhMSnZKMWx6Qi8zVjJsZHR5emd0M2tzd1FHTkUyYmtGWmZWZTFOK0wreTQ1MUpVZWNtK05hdndxbHdscU1KUDU2SnhlTE5JSzZRaVVrWmtMTU9TSW8zT1FIMjM0b3BVOTRtSFhTcUdaMXdmVmVhRVdzUWphY3JwUjBWd0FWV1hNNWttblp5Qy9oMHcyUTlnYUVuUnJpUT09PC9TaWduYXR1cmVWYWx1ZT48S2V5SW5mbz48WDUwOURhdGE+PFg1MDlDZXJ0aWZpY2F0ZT5NSUlFdFRDQ0FwMmdBd0lCQWdJSVZYYXBaMXY4OVlBd0RRWUpLb1pJaHZjTkFRRUxCUUF3YURFTE1Ba0dBMVVFQmhNQ1NWUXhIakFjQmdOVkJBb01GVUZuWlc1NmFXRWdaR1ZzYkdVZ1JXNTBjbUYwWlRFYk1Ca0dBMVVFQ3d3U1UyVnlkbWw2YVNCVVpXeGxiV0YwYVdOcE1Sd3dHZ1lEVlFRRERCTkRRU0JDYjJ4c2J5QlVaV3hsYldGMGFXTnZNQjRYRFRFNU1UQXdNakV6TlRneE4xb1hEVEkxTVRBd01qRXpOVGd4TjFvd1pURUxNQWtHQTFVRUJoTUNTVlF4SGpBY0JnTlZCQW9NRlVGblpXNTZhV0VnWkdWc2JHVWdSVzUwY21GMFpURU1NQW9HQTFVRUN3d0RVRk5RTVNnd0pnWURWUVFEREI4d01EYzVPVGsyTURFMU9DQkpUbFJGVTBFZ1UwRk9VRUZQVEU4Z1UxQkJNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXZLR2d1Q0hwSkJEVVdzUmJZemFMeEg3c3dXM3E0NlRnSitpUDBEYWlXYkkvVEJna0NGUnJ1cE5OeEk2dlI0eFBpUStDYTJ4NEEycVFjYm16eTVTblZ1MGpLeDU2cTlZQ0REYjVRUXZYZHlaUlYraUFwVjhFZ1FiSGJqcW8yTHFRR2NWbWVJNE43b3pDZWQ1cEF6aHdGKytOZkUyWHFpR1pXQ2g1YlhhbkRrM2EveEJ5L2J4WTM0N01GTGtqaE5sZU9vS09jVnRtWmtMbXErU3RJcWJ5VjY2ek9PbXd3UHgzRnhidDkzNGJqRVdSRk5mVktDMTZMZDYwd04wcXk4Z2tuSnRONmg3TWNGbWpHR2tqdWxVMy8rOGxkTjI4dzJ4NWNOZ3dwMmhFY1BwMEJmNmdrU0tRRm9hTjExbzkvd0poSzJFbTZUV3plcWlFQVhVcS9nSHJPUUlEQVFBQm8yWXdaREFmQmdOVkhTTUVHREFXZ0JRcVI3Si9JVXkveTk0SWpkTDRPZXJ2cjk1Q1JEQVNCZ05WSFNBRUN6QUpNQWNHQlN0TUhRRUpNQjBHQTFVZERnUVdCQlFxQnl6UzRTdHZ1QzhjZFdLUnNtK2VZbmdFUERBT0JnTlZIUThCQWY4RUJBTUNCa0F3RFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUFhV3RvbzBHSUlwekJ5ZHluZWMxcFNoUUxkdUZLUEh5cHVTNDFzVEp3YXJJWEV0YzBQc0VydzZaYXpxVGkwak9SQ3gxNVFibzBZbHE0QldFN1pzU1IxNGZnVzlmRU1TSEdRZWF4dDFuNFBlQ1BSN0FKWXdVNkx5azBDYXNTWllaZ0N3RUJMeEJyL2hLR01ya2lrUDJCRm5MbDVUUHBBZlhXWllQTHBhVWE4dC9SSFJtMllmNXhqOStHT0ZLdkJjNmU5bGlFRzQyUGc4d2w3RlZwQUkvV25ESHprTDBCOEtrTDVNOHVzdmlCOEd0dlFHdU0xU1o3Z3NyY29tcTQ4Y1FTQXgvci9Xa1B4NXdzUTlIM0NJTERGRXN5T3YrTTd4S3liN0FSV3l3Sm81QVVOYTRGMEtaYjlZQlJtQ0dqN21iTWpNTG5hbVlKeURtYkoyN0szUitoeHJyY2xjZnVSMjdIWTJkVG11dFRxanJWZmZhM0JqWVZ2bnFCVkdoRUU2WHFTVXF2YlJiTTV1VmFhWHpwWEJPMHlGS1duNGVzQ0hkbVlVWkRtY0FUcTVEMW03aU8rdUN0TVMvQXZMWE82dTljT3JyUVhGaHFFREdCUzcxcCs1VzlJR2Q3ZTJ6NDNJcTdNSm9nT2J1bGxOSHJYNS8yTFlZM0hhbisyZFNYQmxuRkN3ZStsOXNZdGZnMVZWekdlTlh1YTNxc2JLdXMwU3pUZ3NmUmlKY1dZM0t0WFRQemUrYWFwN0J4elY0NXFheDlsalN2dzhQNXNFRUM3R2JzV2tJeGxpU3NMNUV5NWg2ZDNKaTR6K3ltWndvQ2hZY0lRUUcrb05QVjM0TVMzbmVKTHlXYjBIanhtbkZuNk9IQ010OFpzM2tVZDkrMWI3MlAvRVhhM0VHZ2djPC9YNTA5Q2VydGlmaWNhdGU+PFg1MDlDUkw+TUlJQzR6Q0J6QUlCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREJvTVFzd0NRWURWUVFHRXdKSlZERWVNQndHQTFVRUNnd1ZRV2RsYm5wcFlTQmtaV3hzWlNCRmJuUnlZWFJsTVJzd0dRWURWUVFMREJKVFpYSjJhWHBwSUZSbGJHVnRZWFJwWTJreEhEQWFCZ05WQkFNTUUwTkJJRUp2Ykd4dklGUmxiR1Z0WVhScFkyOFhEVEkwTVRJeE56RXpNekkxTWxvWERUSTBNVEl4T0RFek16STFNVnFnTURBdU1COEdBMVVkSXdRWU1CYUFGQ3BIc244aFRML0wzZ2lOMHZnNTZ1K3Yza0pFTUFzR0ExVWRGQVFFQWdJWGZqQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFkMTNsZWF2QXlDc3NabWx0UDg3K0FwV3hESnlta3l5djJvVlVTL0RSclRJeWxmUlJEb2dzNWpZbVRENzA2ZWlLeU5yNzRWU0VFOFkyanVtOEdFckVPdnBjd1JxSzNyRUFjTXExSE81WXZOMnkrRjlVdncwb2ZQZUllU0R0NDVQbEw4WHoydGF4UE5qV3JFMUNFQVUyQ3VHT1ljRlpERVpPRlllcjJ2d2JlTjQ2bUo3aGFjM09zNnRtRWpwVnZya2hjaVk4RlkvdUxNbmZPZE9vam1SU3pUM3Nyek9LbkEyVUxiaHc0VGp0UFBIbFdyd0ZFSFowR1A0eFNZdEoxTnhxeTFtZ21BVW1jd3I5ckI4NElOZmlXUy9ORGlmVmpzYUlNeW9PNG1OTGw0WmdCZUtkUlFIVG9zYUJob29tMitMdjIzNjAybEsvNzVUVE5zblZlb08wUWVMZGpSd2x5citoNDZZLzB3NFRDZmNRMHNpVktGcC8ya1pGZktFOU1YeFlQdmhtQnF4VVJHbHM1L1g4VzVzT2cyUER4M1ViZkdoMi9LODZqRklScmxrQmNISmFjNENiODV3aWQ0bUo3aDNJK2R3dmtUNUxCK2tWcURkMGZuQURxTDEvaGwvT0lhRW1JdzNQanRzSDlwSHQ2UjdzY2lXN242ZmtwSG9ZOXB2dk9wZlhmcGVvTFVMSGpWbUhhUnFkN0dkc21GSjdFbmpYblVOWXJpNDZKYkh0ZUNsM3AvNk9mcFY3NUtjTVNIVGlJYks5SkFITFBGNlpDOUdycEJuT0s2eTBmUTZqWm5yNWNVQ2tESFNMQlprYkx5Kzhzd1liYnI5T2RwbnRlL1JOS1BPQ2VDVmdnQzBhN0VOaXBKeko3K2plaW03cktIKzB0ak1XSExlRUdCND08L1g1MDlDUkw+PC9YNTA5RGF0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9tYXJjYURhQm9sbG8+\n" + + " Pagamento marca da bollo" + + " digitale\n" + + " 9/0702103TS/\n" + + " \n" + + " \n" + + " BCITITMM\n" + + " 00799960158\n" + + " Intesa Sanpaolo S.p.A\n" + + " 00799960158_01_ONUS\n" + + " app\n" + + " creditCard\n" + + " 0.50\n" + + " c47c5e72-ec53-4be7-bcbb-ad7554ba13d7\n" + + " 2024-12-17T23:18:16\n" + + " 2024-12-17\n" + + " 2024-12-18\n" + + " \n" + + ""))); + Mono getResponseMono = reactiveClient.getPaymentReceipt("test", "test"); + PaSendRTV2Request getResponse = getResponseMono.block(); + assertNotNull(getResponse); + } + + @Test + void getPaymentReceiptWithKO() throws JsonProcessingException { + WIRE_MOCK_EXTENSION.stubFor( + get(urlMatching("/receipt/.*")).willReturn(aResponse().withStatus(500))); + Mono getResponseMono = reactiveClient.getPaymentReceipt("test", "test"); + assertThrows(WebClientException.class, () -> getResponseMono.block()); + } +} diff --git a/src/test/java/it/gov/pagopa/mbd/service/controller/HomeControllerTest.java b/src/test/java/it/gov/pagopa/mbd/service/controller/HomeControllerTest.java index df39c02..8a38414 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/controller/HomeControllerTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/controller/HomeControllerTest.java @@ -11,16 +11,15 @@ @WebFluxTest(controllers = HomeController.class) class HomeControllerTest { - @Autowired - private WebTestClient webClient; + @Autowired private WebTestClient webClient; - @Test - void healthCheckTestSuccess() throws Exception { - webClient.get().uri("/info").exchange().expectStatus().is2xxSuccessful(); - } + @Test + void healthCheckTestSuccess() throws Exception { + webClient.get().uri("/info").exchange().expectStatus().is2xxSuccessful(); + } - @Test - void homeTestSuccess() throws Exception { - webClient.get().exchange().expectStatus().is2xxSuccessful(); - } -} \ No newline at end of file + @Test + void homeTestSuccess() throws Exception { + webClient.get().exchange().expectStatus().is2xxSuccessful(); + } +} diff --git a/src/test/java/it/gov/pagopa/mbd/service/controller/MbdControllerTest.java b/src/test/java/it/gov/pagopa/mbd/service/controller/MbdControllerTest.java index cdcff5c..9489267 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/controller/MbdControllerTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/controller/MbdControllerTest.java @@ -1,5 +1,9 @@ package it.gov.pagopa.mbd.service.controller; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + import com.fasterxml.jackson.databind.ObjectMapper; import it.gov.pagopa.mbd.service.model.carts.GetCartErrorResponse; import it.gov.pagopa.mbd.service.model.carts.GetCartResponse; @@ -8,6 +12,7 @@ import it.gov.pagopa.mbd.service.model.mdb.ReturnUrls; import it.gov.pagopa.mbd.service.service.MbdService; import jakarta.inject.Inject; +import java.util.Collections; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -21,89 +26,96 @@ import org.springframework.test.web.reactive.server.WebTestClient; import reactor.core.publisher.Mono; -import java.util.Collections; - -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.when; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; - @ExtendWith(SpringExtension.class) @WebFluxTest(controllers = MbdController.class) class MbdControllerTest { - @MockBean - private MbdService mbdService; - - @Autowired - private WebTestClient webClient; - - @BeforeEach - void setUp() { - Mockito.reset(mbdService); - } + @MockBean private MbdService mbdService; - @Inject - ObjectMapper objectMapper; + @Autowired private WebTestClient webClient; - @Test - void getMdbShouldReturnCheckoutUrlOnPositiveRequest() throws Exception { - when(mbdService.getMbd(any(),any())).thenAnswer(item -> - Mono.just(ResponseEntity.ok().body(GetCartResponse.builder() - .checkoutRedirectUrl("testUrl").build()))); - webClient.post().uri("/organizations/test/mbd").bodyValue( - objectMapper.writeValueAsBytes(GetMbdRequest.builder() - .idCIService("test") - .paymentNotices(Collections.singletonList( - PaymentNotice.builder().build() - )) - .returnUrls(ReturnUrls.builder().build()) - .build())).header("Content-Type",MediaType.APPLICATION_JSON_VALUE) - .exchange().expectStatus().is2xxSuccessful() - .expectBody(GetCartResponse.class).consumeWith(result -> { - GetCartResponse getCartResponse = result.getResponseBody(); - assertNotNull(getCartResponse); - assertNotNull(getCartResponse.getCheckoutRedirectUrl()); - assertEquals(getCartResponse.getCheckoutRedirectUrl(), "testUrl"); - }); + @BeforeEach + void setUp() { + Mockito.reset(mbdService); + } - } + @Inject ObjectMapper objectMapper; - @Test - void getMdbShouldReturnErrorUrlOnKoRequest() throws Exception { - when(mbdService.getMbd(any(),any())).thenAnswer(item -> - Mono.error(new RuntimeException(""))); - webClient.post().uri("/organizations/test/mbd").bodyValue( - objectMapper.writeValueAsBytes(GetMbdRequest.builder() - .idCIService("test") - .paymentNotices(Collections.singletonList( - PaymentNotice.builder().build() - )) - .returnUrls(ReturnUrls.builder().errorUrl("testUrl").build()) - .build())).header("Content-Type",MediaType.APPLICATION_JSON_VALUE) - .exchange().expectStatus().is5xxServerError() - .expectBody(GetCartErrorResponse.class) - .consumeWith(result -> { - GetCartErrorResponse getCartResponse = result.getResponseBody(); - assertNotNull(getCartResponse); - assertNotNull(getCartResponse.getErrorUrl()); - assertEquals(getCartResponse.getErrorUrl(), "testUrl"); - }); - } + @Test + void getMdbShouldReturnCheckoutUrlOnPositiveRequest() throws Exception { + when(mbdService.getMbd(any(), any())) + .thenAnswer( + item -> + Mono.just( + ResponseEntity.ok() + .body(GetCartResponse.builder().checkoutRedirectUrl("testUrl").build()))); + webClient + .post() + .uri("/organizations/test/mbd") + .bodyValue( + objectMapper.writeValueAsBytes( + GetMbdRequest.builder() + .idCIService("test") + .paymentNotices(Collections.singletonList(PaymentNotice.builder().build())) + .returnUrls(ReturnUrls.builder().build()) + .build())) + .header("Content-Type", MediaType.APPLICATION_JSON_VALUE) + .exchange() + .expectStatus() + .is2xxSuccessful() + .expectBody(GetCartResponse.class) + .consumeWith( + result -> { + GetCartResponse getCartResponse = result.getResponseBody(); + assertNotNull(getCartResponse); + assertNotNull(getCartResponse.getCheckoutRedirectUrl()); + assertEquals(getCartResponse.getCheckoutRedirectUrl(), "testUrl"); + }); + } - @Test - void getPaymentReceiptsShouldRetunrContentOnValidCall() throws Exception { - when(mbdService.getPaymentReceipts(any(),any())).thenAnswer(item -> - Mono.just(ResponseEntity.ok().body("ABC".getBytes()))); - webClient.get().uri("/organizations/test/receipt/30000000001") - .exchange().expectStatus().is2xxSuccessful() - .expectBody(String.class) - .consumeWith(result -> { - String body = result.getResponseBody(); - assertNotNull(body); - assertEquals(body, "ABC"); - }); - } + @Test + void getMdbShouldReturnErrorUrlOnKoRequest() throws Exception { + when(mbdService.getMbd(any(), any())).thenAnswer(item -> Mono.error(new RuntimeException(""))); + webClient + .post() + .uri("/organizations/test/mbd") + .bodyValue( + objectMapper.writeValueAsBytes( + GetMbdRequest.builder() + .idCIService("test") + .paymentNotices(Collections.singletonList(PaymentNotice.builder().build())) + .returnUrls(ReturnUrls.builder().errorUrl("testUrl").build()) + .build())) + .header("Content-Type", MediaType.APPLICATION_JSON_VALUE) + .exchange() + .expectStatus() + .is5xxServerError() + .expectBody(GetCartErrorResponse.class) + .consumeWith( + result -> { + GetCartErrorResponse getCartResponse = result.getResponseBody(); + assertNotNull(getCartResponse); + assertNotNull(getCartResponse.getErrorUrl()); + assertEquals(getCartResponse.getErrorUrl(), "testUrl"); + }); + } -} \ No newline at end of file + @Test + void getPaymentReceiptsShouldRetunrContentOnValidCall() throws Exception { + when(mbdService.getPaymentReceipts(any(), any())) + .thenAnswer(item -> Mono.just(ResponseEntity.ok().body("ABC".getBytes()))); + webClient + .get() + .uri("/organizations/test/receipt/30000000001") + .exchange() + .expectStatus() + .is2xxSuccessful() + .expectBody(String.class) + .consumeWith( + result -> { + String body = result.getResponseBody(); + assertNotNull(body); + assertEquals(body, "ABC"); + }); + } +} diff --git a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java index acaa596..8056cad 100644 --- a/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java +++ b/src/test/java/it/gov/pagopa/mbd/service/service/impl/MdbServiceImplTest.java @@ -1,5 +1,9 @@ package it.gov.pagopa.mbd.service.service.impl; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + import it.gov.pagopa.mbd.service.client.ReactiveClient; import it.gov.pagopa.mbd.service.exception.AppException; import it.gov.pagopa.mbd.service.exception.WebClientException; @@ -21,198 +25,206 @@ import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; -import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.datatype.DatatypeFactory; -import java.math.BigDecimal; -import java.nio.charset.Charset; -import java.util.Collections; - -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.when; - @SpringBootTest class MdbServiceImplTest { - @MockBean - private ReactiveClient reactiveClient; + @MockBean private ReactiveClient reactiveClient; - @Inject - private MbdService mbdService; + @Inject private MbdService mbdService; - @Test - void getMdbShouldReturnResponseEntityOnValidData() throws DatatypeConfigurationException { - DemandPaymentNoticeResponse demandPaymentNoticeResponse = DemandPaymentNoticeResponse.builder() - .qrCode(CtQrCode.builder() - .noticeNumber("3000000001") - .fiscalCode("AAAAAAAAAA01") - .build()) - .paymentList( - CtPaymentOptionsDescriptionList.builder() - .paymentOptionDescription(Collections.singletonList( + @Test + void getMdbShouldReturnResponseEntityOnValidData() throws DatatypeConfigurationException { + DemandPaymentNoticeResponse demandPaymentNoticeResponse = + DemandPaymentNoticeResponse.builder() + .qrCode( + CtQrCode.builder().noticeNumber("3000000001").fiscalCode("AAAAAAAAAA01").build()) + .paymentList( + CtPaymentOptionsDescriptionList.builder() + .paymentOptionDescription( + Collections.singletonList( CtPaymentOptionDescription.builder() - .paymentNote("Note") - .amount(BigDecimal.TEN) - .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) - .options(StAmountOptionPSP.ANY).build() - )) - .build()).build(); - demandPaymentNoticeResponse.setOutcome(StOutcome.OK); - when(reactiveClient.demandPaymentNotice(any())).thenAnswer( - item -> Mono.just(demandPaymentNoticeResponse)); - - GetCartResponse getCartResponse = GetCartResponse.builder().checkoutRedirectUrl("testUrl").build(); - when(reactiveClient.getCart(any())).thenAnswer(item -> Mono.just(getCartResponse)); - - Mono responseEntityMono = mbdService.getMbd("test",GetMbdRequest.builder() - .idCIService("1000") - .paymentNotices(Collections.singletonList( - PaymentNotice.builder() - .amount(1000L) - .documentHash("1".repeat(44)) - .email("test@gmail.com") - .fiscalCode("AAAAAAAAAAAAA01") - .lastName("test") - .firstName("test") - .province("RM") - .build() - )) - .returnUrls(ReturnUrls.builder() - .errorUrl("testUrl") - .successUrl("testUrl") - .cancelUrl("testUrl") - .build()) + .paymentNote("Note") + .amount(BigDecimal.TEN) + .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) + .options(StAmountOptionPSP.ANY) + .build())) + .build()) + .build(); + demandPaymentNoticeResponse.setOutcome(StOutcome.OK); + when(reactiveClient.demandPaymentNotice(any())) + .thenAnswer(item -> Mono.just(demandPaymentNoticeResponse)); + + GetCartResponse getCartResponse = + GetCartResponse.builder().checkoutRedirectUrl("testUrl").build(); + when(reactiveClient.getCart(any())).thenAnswer(item -> Mono.just(getCartResponse)); + + Mono responseEntityMono = + mbdService.getMbd( + "test", + GetMbdRequest.builder() + .idCIService("1000") + .paymentNotices( + Collections.singletonList( + PaymentNotice.builder() + .amount(1000L) + .documentHash("1".repeat(44)) + .email("test@gmail.com") + .fiscalCode("AAAAAAAAAAAAA01") + .lastName("test") + .firstName("test") + .province("RM") + .build())) + .returnUrls( + ReturnUrls.builder() + .errorUrl("testUrl") + .successUrl("testUrl") + .cancelUrl("testUrl") + .build()) .build()); - ResponseEntity responseEntity = responseEntityMono.block(); - assertTrue(responseEntity.getStatusCode().is2xxSuccessful()); - GetCartResponse response = (GetCartResponse) responseEntity.getBody(); - assertEquals(response.getCheckoutRedirectUrl(), "testUrl"); - } - - @Test - void getMdbShouldReturnKoOnErrorClientCall() throws DatatypeConfigurationException { - DemandPaymentNoticeResponse demandPaymentNoticeResponse = DemandPaymentNoticeResponse.builder() - .qrCode(CtQrCode.builder() - .noticeNumber("3000000001") - .fiscalCode("AAAAAAAAAA01") - .build()) - .paymentList( - CtPaymentOptionsDescriptionList.builder() - .paymentOptionDescription(Collections.singletonList( - CtPaymentOptionDescription.builder() - .paymentNote("Note") - .amount(BigDecimal.TEN) - .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) - .options(StAmountOptionPSP.ANY).build() - )) - .build()).build(); - demandPaymentNoticeResponse.setOutcome(StOutcome.OK); - when(reactiveClient.demandPaymentNotice(any())).thenAnswer( - item -> Mono.just(demandPaymentNoticeResponse)); - - when(reactiveClient.getCart(any())).thenAnswer(item -> Mono.error(new WebClientException("Error", null))); - - Mono responseEntityMono = mbdService.getMbd("test",GetMbdRequest.builder() + ResponseEntity responseEntity = responseEntityMono.block(); + assertTrue(responseEntity.getStatusCode().is2xxSuccessful()); + GetCartResponse response = (GetCartResponse) responseEntity.getBody(); + assertEquals(response.getCheckoutRedirectUrl(), "testUrl"); + } + + @Test + void getMdbShouldReturnKoOnErrorClientCall() throws DatatypeConfigurationException { + DemandPaymentNoticeResponse demandPaymentNoticeResponse = + DemandPaymentNoticeResponse.builder() + .qrCode( + CtQrCode.builder().noticeNumber("3000000001").fiscalCode("AAAAAAAAAA01").build()) + .paymentList( + CtPaymentOptionsDescriptionList.builder() + .paymentOptionDescription( + Collections.singletonList( + CtPaymentOptionDescription.builder() + .paymentNote("Note") + .amount(BigDecimal.TEN) + .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) + .options(StAmountOptionPSP.ANY) + .build())) + .build()) + .build(); + demandPaymentNoticeResponse.setOutcome(StOutcome.OK); + when(reactiveClient.demandPaymentNotice(any())) + .thenAnswer(item -> Mono.just(demandPaymentNoticeResponse)); + + when(reactiveClient.getCart(any())) + .thenAnswer(item -> Mono.error(new WebClientException("Error", null))); + + Mono responseEntityMono = + mbdService.getMbd( + "test", + GetMbdRequest.builder() .idCIService("1000") - .paymentNotices(Collections.singletonList( + .paymentNotices( + Collections.singletonList( PaymentNotice.builder() - .amount(1000L) - .documentHash("1".repeat(44)) - .email("test@gmail.com") - .fiscalCode("AAAAAAAAAAAAA01") - .lastName("test") - .firstName("test") - .province("RM") - .build() - )) - .returnUrls(ReturnUrls.builder() + .amount(1000L) + .documentHash("1".repeat(44)) + .email("test@gmail.com") + .fiscalCode("AAAAAAAAAAAAA01") + .lastName("test") + .firstName("test") + .province("RM") + .build())) + .returnUrls( + ReturnUrls.builder() .errorUrl("testUrl") .successUrl("testUrl") .cancelUrl("testUrl") .build()) .build()); - assertThrows(AppException.class, () -> responseEntityMono.block()); - - } - - @Test - void getMdbShouldReturnKOOnInvalidData() throws DatatypeConfigurationException { - DemandPaymentNoticeResponse demandPaymentNoticeResponse = DemandPaymentNoticeResponse.builder() - .qrCode(CtQrCode.builder() - .noticeNumber("3000000001") - .fiscalCode("AAAAAAAAAA01") - .build()) - .paymentList( - CtPaymentOptionsDescriptionList.builder() - .paymentOptionDescription(Collections.singletonList( - CtPaymentOptionDescription.builder() - .paymentNote("Note") - .amount(BigDecimal.TEN) - .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) - .options(StAmountOptionPSP.ANY).build() - )) - .build()).build(); - demandPaymentNoticeResponse.setOutcome(StOutcome.OK); - when(reactiveClient.demandPaymentNotice(any())).thenAnswer( - item -> Mono.just(demandPaymentNoticeResponse)); - - GetCartResponse getCartResponse = GetCartResponse.builder().checkoutRedirectUrl("testUrl").build(); - when(reactiveClient.getCart(any())).thenAnswer(item -> Mono.just(getCartResponse)); - - Mono responseEntityMono = mbdService.getMbd("test",GetMbdRequest.builder() + assertThrows(AppException.class, () -> responseEntityMono.block()); + } + + @Test + void getMdbShouldReturnKOOnInvalidData() throws DatatypeConfigurationException { + DemandPaymentNoticeResponse demandPaymentNoticeResponse = + DemandPaymentNoticeResponse.builder() + .qrCode( + CtQrCode.builder().noticeNumber("3000000001").fiscalCode("AAAAAAAAAA01").build()) + .paymentList( + CtPaymentOptionsDescriptionList.builder() + .paymentOptionDescription( + Collections.singletonList( + CtPaymentOptionDescription.builder() + .paymentNote("Note") + .amount(BigDecimal.TEN) + .dueDate(DatatypeFactory.newInstance().newXMLGregorianCalendar()) + .options(StAmountOptionPSP.ANY) + .build())) + .build()) + .build(); + demandPaymentNoticeResponse.setOutcome(StOutcome.OK); + when(reactiveClient.demandPaymentNotice(any())) + .thenAnswer(item -> Mono.just(demandPaymentNoticeResponse)); + + GetCartResponse getCartResponse = + GetCartResponse.builder().checkoutRedirectUrl("testUrl").build(); + when(reactiveClient.getCart(any())).thenAnswer(item -> Mono.just(getCartResponse)); + + Mono responseEntityMono = + mbdService.getMbd( + "test", + GetMbdRequest.builder() .idCIService("1000") - .paymentNotices(Collections.singletonList( + .paymentNotices( + Collections.singletonList( PaymentNotice.builder() - .amount(1000L) - .documentHash("1".repeat(10)) - .email("test@gmail.com") - .fiscalCode("AAAAAAAAAAAAA01") - .lastName("test") - .firstName("test") - .province("RM") - .build() - )) - .returnUrls(ReturnUrls.builder() + .amount(1000L) + .documentHash("1".repeat(10)) + .email("test@gmail.com") + .fiscalCode("AAAAAAAAAAAAA01") + .lastName("test") + .firstName("test") + .province("RM") + .build())) + .returnUrls( + ReturnUrls.builder() .errorUrl("testUrl") .successUrl("testUrl") .cancelUrl("testUrl") .build()) .build()); - assertThrows(ConstraintViolationException.class, () -> responseEntityMono.block()); - } - - @Test - void getPaymentReceiptsShouldReturnOk() { - when(reactiveClient.getPaymentReceipt(any(),any())).thenAnswer( - item -> Mono.just(PaSendRTV2Request.builder().receipt( - CtReceiptV2.builder().transferList( - CtTransferListPAReceiptV2.builder() - .transfer(Collections.singletonList( + assertThrows(ConstraintViolationException.class, () -> responseEntityMono.block()); + } + + @Test + void getPaymentReceiptsShouldReturnOk() { + when(reactiveClient.getPaymentReceipt(any(), any())) + .thenAnswer( + item -> + Mono.just( + PaSendRTV2Request.builder() + .receipt( + CtReceiptV2.builder() + .transferList( + CtTransferListPAReceiptV2.builder() + .transfer( + Collections.singletonList( CtTransferPAReceiptV2.builder() - .mbdAttachment("test".getBytes()) - .build() - )).build()).build()).build())); - ResponseEntity responseEntity = mbdService.getPaymentReceipts("test","test").block(); - assertTrue(responseEntity.getStatusCode().is2xxSuccessful()); - } - - @Test - void getPaymentReceiptsShouldReturnKoException() { - WebClientException error = new WebClientException("Error on test call", null); - when(reactiveClient.getPaymentReceipt(any(),any())).thenAnswer( - item -> Mono.error(error)); - assertThrows(AppException.class, () -> mbdService.getPaymentReceipts("test","test").block()); - } - -} \ No newline at end of file + .mbdAttachment("test".getBytes()) + .build())) + .build()) + .build()) + .build())); + ResponseEntity responseEntity = mbdService.getPaymentReceipts("test", "test").block(); + assertTrue(responseEntity.getStatusCode().is2xxSuccessful()); + } + + @Test + void getPaymentReceiptsShouldReturnKoException() { + WebClientException error = new WebClientException("Error on test call", null); + when(reactiveClient.getPaymentReceipt(any(), any())).thenAnswer(item -> Mono.error(error)); + assertThrows(AppException.class, () -> mbdService.getPaymentReceipts("test", "test").block()); + } +} From 91f005718300e5ac4ba097c9a4a6e0ef028e3056 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Wed, 18 Dec 2024 14:00:00 +0000 Subject: [PATCH 28/28] Bump to version 1.2.3 [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 4569a1a..ff2ba19 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-mbd-service description: Microservice that handles services for eBollo type: application -version: 0.101.0 -appVersion: 1.2.2 +version: 0.102.0 +appVersion: 1.2.3 dependencies: - name: microservice-chart version: 7.1.1 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 17f458e..e381f88 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.2" + tag: "1.2.3" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 46182a0..d4bd56a 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.2" + tag: "1.2.3" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 7313ffb..66925c7 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-mbd-service" image: repository: ghcr.io/pagopa/pagopa-mbd-service - tag: "1.2.2" + tag: "1.2.3" pullPolicy: Always livenessProbe: handlerType: httpGet diff --git a/openapi/openapi.json b/openapi/openapi.json index 44ff12f..f8e3bef 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "mbd-service", "description": "MBD Service", "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.2.2" + "version": "1.2.3" }, "servers": [ { diff --git a/pom.xml b/pom.xml index aac89b5..215d416 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.ebollo mbd-service - 1.2.2 + 1.2.3 MBD Service MBD Service