From f8d45cbd3ceff9368380b8c10f14eb77c332f7d4 Mon Sep 17 00:00:00 2001 From: AngeloCaporaso Date: Wed, 5 Jun 2024 18:14:01 +0200 Subject: [PATCH 1/9] [PAGOPA-1800] fix: Update Stamp mapping --- pom.xml | 1 + ...MarcaDaBolloToCtRichiestaMarcaDaBollo.java | 19 +++++-------------- .../payments/service/PartnerService.java | 8 ++++++-- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 3e63cecc..fedb921b 100644 --- a/pom.xml +++ b/pom.xml @@ -185,6 +185,7 @@ org.projectlombok lombok + 1.18.30 true diff --git a/src/main/java/it/gov/pagopa/payments/mapper/ConvertMarcaDaBolloToCtRichiestaMarcaDaBollo.java b/src/main/java/it/gov/pagopa/payments/mapper/ConvertMarcaDaBolloToCtRichiestaMarcaDaBollo.java index 3a99f091..452ea251 100644 --- a/src/main/java/it/gov/pagopa/payments/mapper/ConvertMarcaDaBolloToCtRichiestaMarcaDaBollo.java +++ b/src/main/java/it/gov/pagopa/payments/mapper/ConvertMarcaDaBolloToCtRichiestaMarcaDaBollo.java @@ -1,32 +1,23 @@ package it.gov.pagopa.payments.mapper; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import it.gov.pagopa.payments.model.Stamp; import it.gov.pagopa.payments.model.partner.CtRichiestaMarcaDaBollo; -import java.util.Collections; import javax.validation.Valid; import org.modelmapper.Converter; import org.modelmapper.MappingException; -import org.modelmapper.spi.ErrorMessage; import org.modelmapper.spi.MappingContext; public class ConvertMarcaDaBolloToCtRichiestaMarcaDaBollo implements Converter { @Override - public CtRichiestaMarcaDaBollo convert( - MappingContext context) throws MappingException { - ObjectMapper mapper = new ObjectMapper(); + public CtRichiestaMarcaDaBollo convert(MappingContext context) + throws MappingException { @Valid Stamp source = context.getSource(); CtRichiestaMarcaDaBollo ctRichiestaMarcaDaBollo = new CtRichiestaMarcaDaBollo(); - try { - ctRichiestaMarcaDaBollo.setTipoBollo(source.getStampType()); - ctRichiestaMarcaDaBollo.setProvinciaResidenza(source.getProvincialResidence()); - ctRichiestaMarcaDaBollo.setHashDocumento(mapper.writeValueAsBytes(source.getHashDocument())); - } catch (JsonProcessingException e) { - throw new MappingException(Collections.singletonList(new ErrorMessage(e.getMessage()))); - } + ctRichiestaMarcaDaBollo.setTipoBollo(source.getStampType()); + ctRichiestaMarcaDaBollo.setProvinciaResidenza(source.getProvincialResidence()); + ctRichiestaMarcaDaBollo.setHashDocumento(source.getHashDocument().getBytes()); return ctRichiestaMarcaDaBollo; } } diff --git a/src/main/java/it/gov/pagopa/payments/service/PartnerService.java b/src/main/java/it/gov/pagopa/payments/service/PartnerService.java index dda9d552..19395360 100644 --- a/src/main/java/it/gov/pagopa/payments/service/PartnerService.java +++ b/src/main/java/it/gov/pagopa/payments/service/PartnerService.java @@ -548,8 +548,12 @@ private CtTransferPA getTransferResponse( */ private CtTransferPAV2 getTransferResponseV2( PaymentsTransferModelResponse transfer, StTransferType transferType) { - CtRichiestaMarcaDaBollo richiestaMarcaDaBollo = - customizedModelMapper.map(transfer.getStamp(), CtRichiestaMarcaDaBollo.class); + Stamp stamp = transfer.getStamp(); + CtRichiestaMarcaDaBollo richiestaMarcaDaBollo = null; + + if(stamp.getHashDocument() != null && stamp.getStampType() != null && stamp.getProvincialResidence() != null) + richiestaMarcaDaBollo = customizedModelMapper.map(transfer.getStamp(), CtRichiestaMarcaDaBollo.class); + CtTransferPAV2 transferPA = new CtTransferPAV2(); transferPA.setFiscalCodePA(transfer.getOrganizationFiscalCode()); transferPA.setRichiestaMarcaDaBollo(richiestaMarcaDaBollo); From de175f3ee48215b70317d2ad40d5f3c240140885 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Wed, 5 Jun 2024 16:19:40 +0000 Subject: [PATCH 2/9] Bump to version 0.12.23-1-PAGOPA-1800 [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 54396160..b344f09a 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-gpd-payments description: Microservice that exposes API for payment receipts retrieving and other operations type: application -version: 0.97.0 -appVersion: 0.12.23 +version: 0.98.0 +appVersion: 0.12.23-1-PAGOPA-1800 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 45afffe4..daf9590e 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23" + tag: "0.12.23-1-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 9b9c7186..9924a0bf 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23" + tag: "0.12.23-1-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index bc71d54f..53287910 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23" + tag: "0.12.23-1-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index b6dda184..96efd72b 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "PagoPA API Payments", "description": "Payments", "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.12.23" + "version": "0.12.23-1-PAGOPA-1800" }, "servers": [ { diff --git a/pom.xml b/pom.xml index fedb921b..6f254d13 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa payments - 0.12.23 + 0.12.23-1-PAGOPA-1800 Payments Payments From ef5759e7ee6ebfb82a2891bd75530e0259bcdba4 Mon Sep 17 00:00:00 2001 From: AngeloCaporaso Date: Wed, 5 Jun 2024 18:26:22 +0200 Subject: [PATCH 3/9] [PAGOPA-1800] fix deploy_with_github_runner.yml --- .github/workflows/deploy_with_github_runner.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_with_github_runner.yml b/.github/workflows/deploy_with_github_runner.yml index e7969052..67f898a3 100644 --- a/.github/workflows/deploy_with_github_runner.yml +++ b/.github/workflows/deploy_with_github_runner.yml @@ -42,6 +42,7 @@ jobs: container_app_environment_name: ${{ vars.CONTAINER_APP_ENVIRONMENT_NAME }} resource_group_name: ${{ vars.CONTAINER_APP_ENVIRONMENT_RESOURCE_GROUP_NAME }} # RG of the runner pat_token: ${{ secrets.BOT_TOKEN_GITHUB }} + self_hosted_runner_image_tag: "latest" deploy: needs: [ create_runner ] From 0eff88424b1ceb420d9a4d24c7340e6eae23cd64 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Wed, 5 Jun 2024 16:27:45 +0000 Subject: [PATCH 4/9] Bump to version 0.12.23-2-PAGOPA-1800 [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 b344f09a..9cc82f76 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-gpd-payments description: Microservice that exposes API for payment receipts retrieving and other operations type: application -version: 0.98.0 -appVersion: 0.12.23-1-PAGOPA-1800 +version: 0.99.0 +appVersion: 0.12.23-2-PAGOPA-1800 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index daf9590e..0f6bb41f 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-1-PAGOPA-1800" + tag: "0.12.23-2-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 9924a0bf..0e03489b 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-1-PAGOPA-1800" + tag: "0.12.23-2-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 53287910..d1d686fb 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-1-PAGOPA-1800" + tag: "0.12.23-2-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 96efd72b..b1948d8f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "PagoPA API Payments", "description": "Payments", "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.12.23-1-PAGOPA-1800" + "version": "0.12.23-2-PAGOPA-1800" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 6f254d13..286e0c2f 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa payments - 0.12.23-1-PAGOPA-1800 + 0.12.23-2-PAGOPA-1800 Payments Payments From b807252df1417e2fb6dd4e0505ea3c8abbf30a34 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 6 Jun 2024 07:10:20 +0000 Subject: [PATCH 5/9] Bump to version 0.12.23-3-PAGOPA-1800 [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 9cc82f76..a81cafa0 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-gpd-payments description: Microservice that exposes API for payment receipts retrieving and other operations type: application -version: 0.99.0 -appVersion: 0.12.23-2-PAGOPA-1800 +version: 0.100.0 +appVersion: 0.12.23-3-PAGOPA-1800 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 0f6bb41f..aaea71e1 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-2-PAGOPA-1800" + tag: "0.12.23-3-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 0e03489b..ec818dc6 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-2-PAGOPA-1800" + tag: "0.12.23-3-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index d1d686fb..bed58834 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-2-PAGOPA-1800" + tag: "0.12.23-3-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index b1948d8f..2a574843 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "PagoPA API Payments", "description": "Payments", "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.12.23-2-PAGOPA-1800" + "version": "0.12.23-3-PAGOPA-1800" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 286e0c2f..96779639 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa payments - 0.12.23-2-PAGOPA-1800 + 0.12.23-3-PAGOPA-1800 Payments Payments From 6c68f8f9dc974dfcecb944b5b2eb2d9dc5599f0f Mon Sep 17 00:00:00 2001 From: AngeloCaporaso Date: Thu, 6 Jun 2024 10:31:28 +0200 Subject: [PATCH 6/9] [PAGOPA-1800] test: Add JUnit test for transfer with Stamp --- .../payments/service/PartnerServiceTest.java | 418 ++++++++++-------- .../resources/gpd/getPaymentOption_STAMP.json | 65 +++ 2 files changed, 301 insertions(+), 182 deletions(-) create mode 100644 src/test/resources/gpd/getPaymentOption_STAMP.json diff --git a/src/test/java/it/gov/pagopa/payments/service/PartnerServiceTest.java b/src/test/java/it/gov/pagopa/payments/service/PartnerServiceTest.java index 25cad25d..2d6bccd7 100644 --- a/src/test/java/it/gov/pagopa/payments/service/PartnerServiceTest.java +++ b/src/test/java/it/gov/pagopa/payments/service/PartnerServiceTest.java @@ -9,54 +9,18 @@ import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; -import java.io.IOException; -import java.math.BigDecimal; -import java.net.URISyntaxException; -import java.security.InvalidKeyException; - -import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.datatype.DatatypeConstants; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.XMLStreamException; - -import com.azure.storage.queue.QueueClient; -import com.azure.storage.queue.QueueClientBuilder; -import com.microsoft.azure.storage.queue.CloudQueue; -import com.microsoft.azure.storage.queue.CloudQueueClient; -import org.junit.ClassRule; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.CsvSource; -import org.junit.jupiter.params.provider.ValueSource; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.Resource; -import org.springframework.core.io.ResourceLoader; -import org.testcontainers.containers.GenericContainer; -import org.testcontainers.junit.jupiter.Container; -import org.testcontainers.junit.jupiter.Testcontainers; -import org.testcontainers.utility.DockerImageName; -import org.xml.sax.SAXException; - import com.azure.data.tables.TableClient; import com.azure.data.tables.TableClientBuilder; +import com.azure.storage.queue.QueueClient; +import com.azure.storage.queue.QueueClientBuilder; import com.microsoft.azure.storage.CloudStorageAccount; import com.microsoft.azure.storage.RetryNoRetry; import com.microsoft.azure.storage.StorageException; +import com.microsoft.azure.storage.queue.CloudQueue; +import com.microsoft.azure.storage.queue.CloudQueueClient; import com.microsoft.azure.storage.table.CloudTable; import com.microsoft.azure.storage.table.CloudTableClient; import com.microsoft.azure.storage.table.TableRequestOptions; - import feign.FeignException; import feign.RetryableException; import it.gov.pagopa.payments.endpoints.validation.exceptions.PartnerValidationException; @@ -65,12 +29,7 @@ import it.gov.pagopa.payments.mock.PaGetPaymentReqMock; import it.gov.pagopa.payments.mock.PaSendRTReqMock; import it.gov.pagopa.payments.mock.PaVerifyPaymentNoticeReqMock; -import it.gov.pagopa.payments.model.DebtPositionStatus; -import it.gov.pagopa.payments.model.PaaErrorEnum; -import it.gov.pagopa.payments.model.PaymentOptionModel; -import it.gov.pagopa.payments.model.PaymentOptionModelResponse; -import it.gov.pagopa.payments.model.PaymentOptionStatus; -import it.gov.pagopa.payments.model.PaymentsModelResponse; +import it.gov.pagopa.payments.model.*; import it.gov.pagopa.payments.model.partner.CtMapEntry; import it.gov.pagopa.payments.model.partner.CtMetadata; import it.gov.pagopa.payments.model.partner.CtTransferPA; @@ -91,7 +50,39 @@ import it.gov.pagopa.payments.model.spontaneous.PaymentPositionModel; import it.gov.pagopa.payments.utils.AzuriteStorageUtil; import it.gov.pagopa.payments.utils.CustomizedMapper; +import java.io.IOException; +import java.math.BigDecimal; +import java.net.URISyntaxException; +import java.security.InvalidKeyException; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.stream.XMLStreamException; import lombok.extern.slf4j.Slf4j; +import org.junit.ClassRule; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.core.io.DefaultResourceLoader; +import org.springframework.core.io.Resource; +import org.springframework.core.io.ResourceLoader; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.utility.DockerImageName; +import org.xml.sax.SAXException; @Testcontainers @ExtendWith(MockitoExtension.class) @@ -148,7 +139,8 @@ void paVerifyPaymentNoticeTest() throws DatatypeConfigurationException, IOExcept .thenReturn(factoryUtil.createCtPaymentOptionsDescriptionListPA()); PaymentsModelResponse paymentModel = - MockUtil.readModelFromFile("gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class); + MockUtil.readModelFromFile( + "gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class); when(gpdClient.getPaymentOption(anyString(), anyString())).thenReturn(paymentModel); // Test execution @@ -308,7 +300,8 @@ void paGetPaymentTest() when(gpdClient.getPaymentOption(anyString(), anyString())) .thenReturn( - MockUtil.readModelFromFile("gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); + MockUtil.readModelFromFile( + "gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); // Test execution PaGetPaymentRes responseBody = partnerService.paGetPayment(requestBody); @@ -528,7 +521,7 @@ void paSendRTTestKOConflict() throws DatatypeConfigurationException, IOException assertEquals(PaaErrorEnum.PAA_RECEIPT_DUPLICATA, ex.getError()); } } - + @Test void paSendRTTestKOUnknown() throws DatatypeConfigurationException, IOException { @@ -577,8 +570,13 @@ void paSendRTTestKOUnknown() throws DatatypeConfigurationException, IOException } @ParameterizedTest - @CsvSource({"PO_UNPAID,11111111112222223", "PO_PARTIALLY_REPORTED,11111111112222227", "PO_REPORTED,11111111112222228"}) - void paSendRTTestKOStatus(String status, String iuv) throws DatatypeConfigurationException, IOException { + @CsvSource({ + "PO_UNPAID,11111111112222223", + "PO_PARTIALLY_REPORTED,11111111112222227", + "PO_REPORTED,11111111112222228" + }) + void paSendRTTestKOStatus(String status, String iuv) + throws DatatypeConfigurationException, IOException { var pService = spy( @@ -777,11 +775,8 @@ void azureStorageTest() throws InvalidKeyException, URISyntaxException, StorageE @Test void paDemandPaymentNoticeTest() - throws DatatypeConfigurationException, - IOException, - XMLStreamException, - ParserConfigurationException, - SAXException { + throws DatatypeConfigurationException, IOException, XMLStreamException, + ParserConfigurationException, SAXException { var pService = spy( new PartnerService( @@ -826,24 +821,20 @@ void paDemandPaymentNoticeTest() @Test void paDemandPaymentNoticeNotFoundTest() - throws - IOException, - DatatypeConfigurationException, - XMLStreamException, - ParserConfigurationException, - SAXException { + throws IOException, DatatypeConfigurationException, XMLStreamException, + ParserConfigurationException, SAXException { var pService = - spy( - new PartnerService( - resource, - queueSendInvisibilityTime, - factory, - gpdClient, - gpsClient, - tableClientConfiguration(), - queueClientConfiguration(), - customizedModelMapper)); + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); // Test preconditions var requestBody = PaDemandNoticePaymentReqMock.getMock(); @@ -852,10 +843,10 @@ void paDemandPaymentNoticeNotFoundTest() when(gpsClient.createSpontaneousPayments(anyString(), any())).thenThrow(e); var paymentModel = - MockUtil.readModelFromFile( - "gps/createSpontaneousPayments.json", PaymentPositionModel.class); + MockUtil.readModelFromFile( + "gps/createSpontaneousPayments.json", PaymentPositionModel.class); // Test execution - try{ + try { pService.paDemandPaymentNotice(requestBody); fail(); } catch (PartnerValidationException ex) { @@ -894,7 +885,8 @@ void paGetPaymentV2Test() when(gpdClient.getPaymentOption(anyString(), anyString())) .thenReturn( - MockUtil.readModelFromFile("gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); + MockUtil.readModelFromFile( + "gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); // Test execution PaGetPaymentV2Response responseBody = pService.paGetPaymentV2(requestBody); @@ -928,7 +920,53 @@ void paGetPaymentV2Test() org.hamcrest.Matchers.hasProperty( "IBAN", org.hamcrest.Matchers.is("ABC"))))); } - + + @Test + void paGetPaymentV2StampTest() + throws PartnerValidationException, DatatypeConfigurationException, IOException { + + var pService = + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); + + // Test preconditions + PaGetPaymentV2Request requestBody = PaGetPaymentReqMock.getMockV2(); + + when(factory.createPaGetPaymentV2Response()) + .thenReturn(factoryUtil.createPaGetPaymentV2Response()); + when(factory.createCtPaymentPAV2()).thenReturn(factoryUtil.createCtPaymentPAV2()); + when(factory.createCtSubject()).thenReturn(factoryUtil.createCtSubject()); + when(factory.createCtEntityUniqueIdentifier()) + .thenReturn(factoryUtil.createCtEntityUniqueIdentifier()); + when(factory.createCtTransferListPAV2()).thenReturn(factoryUtil.createCtTransferListPAV2()); + when(factory.createCtMetadata()).thenReturn(factoryUtil.createCtMetadata()); + PaymentsModelResponse paymentsModelResponse = + MockUtil.readModelFromFile("gpd/getPaymentOption_STAMP.json", PaymentsModelResponse.class); + when(gpdClient.getPaymentOption(anyString(), anyString())).thenReturn(paymentsModelResponse); + + // Test execution + PaGetPaymentV2Response responseBody = pService.paGetPaymentV2(requestBody); + + // Test post condition + assertEquals(1, responseBody.getData().getTransferList().getTransfer().size()); + + // in paGetPayment v2 there is the new 'richiestaMarcaDaBollo' field and it can be valued + org.hamcrest.MatcherAssert.assertThat( + responseBody.getData().getTransferList().getTransfer(), + org.hamcrest.Matchers.contains( + org.hamcrest.Matchers.allOf( + org.hamcrest.Matchers.hasProperty( + "richiestaMarcaDaBollo", org.hamcrest.Matchers.notNullValue())))); + } + @Test void paGetPaymentV2_TransferTypePAGOPA_Test() throws PartnerValidationException, DatatypeConfigurationException, IOException { @@ -959,7 +997,8 @@ void paGetPaymentV2_TransferTypePAGOPA_Test() when(gpdClient.getPaymentOption(anyString(), anyString())) .thenReturn( - MockUtil.readModelFromFile("gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); + MockUtil.readModelFromFile( + "gpd/getPaymentOption_PO_UNPAID.json", PaymentsModelResponse.class)); // Test execution PaGetPaymentV2Response responseBody = pService.paGetPaymentV2(requestBody); @@ -983,7 +1022,7 @@ void paGetPaymentV2_TransferTypePAGOPA_Test() responseBody.getData().getTransferList().getTransfer(), org.hamcrest.Matchers.contains( org.hamcrest.Matchers.allOf( - org.hamcrest.Matchers.hasProperty( + org.hamcrest.Matchers.hasProperty( "fiscalCodePA", org.hamcrest.Matchers.is("string")), org.hamcrest.Matchers.hasProperty( "richiestaMarcaDaBollo", org.hamcrest.Matchers.nullValue()), @@ -992,15 +1031,18 @@ void paGetPaymentV2_TransferTypePAGOPA_Test() org.hamcrest.Matchers.hasProperty( "metadata", org.hamcrest.Matchers.notNullValue()), org.hamcrest.Matchers.hasProperty( - "metadata", org.hamcrest.Matchers.hasProperty( - "mapEntry", org.hamcrest.Matchers.hasSize(2))), - org.hamcrest.Matchers.hasProperty( - "metadata", org.hamcrest.Matchers.hasProperty( - "mapEntry", org.hamcrest.Matchers.hasItem( - org.hamcrest.Matchers.hasProperty("key", org.hamcrest.Matchers.is("IBANAPPOGGIO")) - )))), + "metadata", + org.hamcrest.Matchers.hasProperty( + "mapEntry", org.hamcrest.Matchers.hasSize(2))), + org.hamcrest.Matchers.hasProperty( + "metadata", + org.hamcrest.Matchers.hasProperty( + "mapEntry", + org.hamcrest.Matchers.hasItem( + org.hamcrest.Matchers.hasProperty( + "key", org.hamcrest.Matchers.is("IBANAPPOGGIO")))))), org.hamcrest.Matchers.allOf( - org.hamcrest.Matchers.hasProperty( + org.hamcrest.Matchers.hasProperty( "fiscalCodePA", org.hamcrest.Matchers.is("77777777777")), org.hamcrest.Matchers.hasProperty( "richiestaMarcaDaBollo", org.hamcrest.Matchers.nullValue()), @@ -1009,8 +1051,9 @@ void paGetPaymentV2_TransferTypePAGOPA_Test() org.hamcrest.Matchers.hasProperty( "metadata", org.hamcrest.Matchers.notNullValue()), org.hamcrest.Matchers.hasProperty( - "metadata", org.hamcrest.Matchers.hasProperty( - "mapEntry", org.hamcrest.Matchers.hasSize(1)))))); + "metadata", + org.hamcrest.Matchers.hasProperty( + "mapEntry", org.hamcrest.Matchers.hasSize(1)))))); } @Test @@ -1220,57 +1263,62 @@ void paSendRTV2TestKOConflict() throws DatatypeConfigurationException, IOExcepti assertEquals(PaaErrorEnum.PAA_RECEIPT_DUPLICATA, ex.getError()); } } - + @Test void paSendRTV2TestKOUnknown() throws DatatypeConfigurationException, IOException { - var pService = - spy( - new PartnerService( - resource, - queueSendInvisibilityTime, - factory, - gpdClient, - gpsClient, - tableClientConfiguration(), - queueClientConfiguration(), - customizedModelMapper)); - - // Test preconditions - PaSendRTV2Request requestBody = PaSendRTReqMock.getMockV2("11111111112222232"); - - var e = Mockito.mock(FeignException.NotFound.class); - when(gpdClient.receiptPaymentOption(anyString(), anyString(), any(PaymentOptionModel.class))) - .thenThrow(e); - - try { - CloudStorageAccount cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString); - CloudTableClient cloudTableClient = cloudStorageAccount.createCloudTableClient(); - TableRequestOptions tableRequestOptions = new TableRequestOptions(); - tableRequestOptions.setRetryPolicyFactory(RetryNoRetry.getInstance()); - cloudTableClient.setDefaultRequestOptions(tableRequestOptions); - CloudTable table = cloudTableClient.getTableReference("receiptsTable"); - table.createIfNotExists(); - CloudQueueClient cloudQueueClient = cloudStorageAccount.createCloudQueueClient(); - CloudQueue queue = cloudQueueClient.getQueueReference("testqueue"); - queue.createIfNotExists(); - } catch (Exception ex) { - log.info("Error during table creation", e); - } - - try { - // Test execution - pService.paSendRTV2(requestBody); - fail(); - } catch (PartnerValidationException ex) { - // Test post condition - assertEquals(PaaErrorEnum.PAA_PAGAMENTO_SCONOSCIUTO, ex.getError()); - } + var pService = + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); + + // Test preconditions + PaSendRTV2Request requestBody = PaSendRTReqMock.getMockV2("11111111112222232"); + + var e = Mockito.mock(FeignException.NotFound.class); + when(gpdClient.receiptPaymentOption(anyString(), anyString(), any(PaymentOptionModel.class))) + .thenThrow(e); + + try { + CloudStorageAccount cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString); + CloudTableClient cloudTableClient = cloudStorageAccount.createCloudTableClient(); + TableRequestOptions tableRequestOptions = new TableRequestOptions(); + tableRequestOptions.setRetryPolicyFactory(RetryNoRetry.getInstance()); + cloudTableClient.setDefaultRequestOptions(tableRequestOptions); + CloudTable table = cloudTableClient.getTableReference("receiptsTable"); + table.createIfNotExists(); + CloudQueueClient cloudQueueClient = cloudStorageAccount.createCloudQueueClient(); + CloudQueue queue = cloudQueueClient.getQueueReference("testqueue"); + queue.createIfNotExists(); + } catch (Exception ex) { + log.info("Error during table creation", e); + } + + try { + // Test execution + pService.paSendRTV2(requestBody); + fail(); + } catch (PartnerValidationException ex) { + // Test post condition + assertEquals(PaaErrorEnum.PAA_PAGAMENTO_SCONOSCIUTO, ex.getError()); + } } @ParameterizedTest - @CsvSource({"PO_UNPAID,11111111112222233", "PO_PARTIALLY_REPORTED,11111111112222237", "PO_REPORTED,11111111112222238"}) - void paSendRTV2TestKOStatus(String status, String iuv) throws DatatypeConfigurationException, IOException { + @CsvSource({ + "PO_UNPAID,11111111112222233", + "PO_PARTIALLY_REPORTED,11111111112222237", + "PO_REPORTED,11111111112222238" + }) + void paSendRTV2TestKOStatus(String status, String iuv) + throws DatatypeConfigurationException, IOException { var pService = spy( @@ -1463,16 +1511,16 @@ void paSendRTV2TestKO() throws DatatypeConfigurationException, IOException { void paSendRTV2ReceiptConflict() throws DatatypeConfigurationException, IOException { var pService = - spy( - new PartnerService( - resource, - queueSendInvisibilityTime, - factory, - gpdClient, - gpsClient, - tableClientConfiguration(), - queueClientConfiguration(), - customizedModelMapper)); + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); // Test preconditions PaSendRTV2Request requestBody = PaSendRTReqMock.getMockV2("11111111112222239"); @@ -1480,9 +1528,9 @@ void paSendRTV2ReceiptConflict() throws DatatypeConfigurationException, IOExcept when(factory.createPaSendRTV2Response()).thenReturn(factoryUtil.createPaSendRTV2Response()); when(gpdClient.receiptPaymentOption(anyString(), anyString(), any(PaymentOptionModel.class))) - .thenReturn( - MockUtil.readModelFromFile( - "gpd/receiptPaymentOption.json", PaymentOptionModelResponse.class)); + .thenReturn( + MockUtil.readModelFromFile( + "gpd/receiptPaymentOption.json", PaymentOptionModelResponse.class)); try { CloudStorageAccount cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString); @@ -1501,26 +1549,29 @@ void paSendRTV2ReceiptConflict() throws DatatypeConfigurationException, IOExcept // Test execution pService.paSendRTV2(requestBody); - PartnerValidationException e = Assertions.assertThrows(PartnerValidationException.class, () -> pService.paSendRTV2(requestBody)); + PartnerValidationException e = + Assertions.assertThrows( + PartnerValidationException.class, () -> pService.paSendRTV2(requestBody)); // Test post condition - assertEquals("PAA_RECEIPT_DUPLICATA, L'id del pagamento ricevuto e' duplicato", e.getMessage()); + assertEquals( + "PAA_RECEIPT_DUPLICATA, L'id del pagamento ricevuto e' duplicato", e.getMessage()); } @Test void paSendRTReceiptConflict() throws DatatypeConfigurationException, IOException { var pService = - spy( - new PartnerService( - resource, - queueSendInvisibilityTime, - factory, - gpdClient, - gpsClient, - tableClientConfiguration(), - queueClientConfiguration(), - customizedModelMapper)); + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); // Test preconditions PaSendRTReq requestBody = PaSendRTReqMock.getMock("11111111112222240"); @@ -1528,9 +1579,9 @@ void paSendRTReceiptConflict() throws DatatypeConfigurationException, IOExceptio when(factory.createPaSendRTRes()).thenReturn(factoryUtil.createPaSendRTRes()); when(gpdClient.receiptPaymentOption(anyString(), anyString(), any(PaymentOptionModel.class))) - .thenReturn( - MockUtil.readModelFromFile( - "gpd/receiptPaymentOption.json", PaymentOptionModelResponse.class)); + .thenReturn( + MockUtil.readModelFromFile( + "gpd/receiptPaymentOption.json", PaymentOptionModelResponse.class)); try { CloudStorageAccount cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString); @@ -1549,32 +1600,35 @@ void paSendRTReceiptConflict() throws DatatypeConfigurationException, IOExceptio // Test execution pService.paSendRT(requestBody); - PartnerValidationException e = Assertions.assertThrows(PartnerValidationException.class, () -> pService.paSendRT(requestBody)); + PartnerValidationException e = + Assertions.assertThrows( + PartnerValidationException.class, () -> pService.paSendRT(requestBody)); // Test post condition - assertEquals("PAA_RECEIPT_DUPLICATA, L'id del pagamento ricevuto e' duplicato", e.getMessage()); + assertEquals( + "PAA_RECEIPT_DUPLICATA, L'id del pagamento ricevuto e' duplicato", e.getMessage()); } @Test void paSendRTQueueInsertTest() throws DatatypeConfigurationException, IOException { var pService = - spy( - new PartnerService( - resource, - queueSendInvisibilityTime, - factory, - gpdClient, - gpsClient, - tableClientConfiguration(), - queueClientConfiguration(), - customizedModelMapper)); + spy( + new PartnerService( + resource, + queueSendInvisibilityTime, + factory, + gpdClient, + gpsClient, + tableClientConfiguration(), + queueClientConfiguration(), + customizedModelMapper)); // Test preconditions PaSendRTReq requestBody = PaSendRTReqMock.getMock("11111111112222225"); var e = Mockito.mock(FeignException.class); when(gpdClient.receiptPaymentOption(anyString(), anyString(), any(PaymentOptionModel.class))) - .thenThrow(e); + .thenThrow(e); try { CloudStorageAccount cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString); @@ -1604,16 +1658,16 @@ void paSendRTQueueInsertTest() throws DatatypeConfigurationException, IOExceptio } private TableClient tableClientConfiguration() { - return new TableClientBuilder() - .connectionString(storageConnectionString) - .tableName("receiptsTable") - .buildClient(); + return new TableClientBuilder() + .connectionString(storageConnectionString) + .tableName("receiptsTable") + .buildClient(); } private QueueClient queueClientConfiguration() { return new QueueClientBuilder() - .connectionString(storageConnectionString) - .queueName("testqueue") - .buildClient(); + .connectionString(storageConnectionString) + .queueName("testqueue") + .buildClient(); } } diff --git a/src/test/resources/gpd/getPaymentOption_STAMP.json b/src/test/resources/gpd/getPaymentOption_STAMP.json new file mode 100644 index 00000000..4cc3db40 --- /dev/null +++ b/src/test/resources/gpd/getPaymentOption_STAMP.json @@ -0,0 +1,65 @@ +{ + "nav": "311111111112222222", + "iuv": "11111111112222222", + "organizationFiscalCode": "77777777777", + "amount": 1055, + "description": "string", + "isPartialPayment": true, + "dueDate": "2122-02-24T17:03:59.408Z", + "retentionDate": "2022-02-25T17:03:59.408Z", + "paymentDate": null, + "reportingDate": "2022-02-24T17:03:59.408Z", + "insertedDate": "2022-02-24T17:03:59.408Z", + "paymentMethod": "string", + "fee": 0, + "pspCompany": "string", + "idReceipt": "string", + "idFlowReporting": "string", + "status": "PO_UNPAID", + "paymentOptionMetadata": [ + { + "key": "string", + "value": "string" + } + ], + "type": "G", + "fiscalCode": "string", + "fullName": "string", + "streetName": "string", + "civicNumber": "string", + "postalCode": "string", + "city": "string", + "province": "string", + "region": "string", + "country": "string", + "email": "string", + "phone": "string", + "companyName": "string", + "officeName": "string", + "debtPositionStatus": "VALID", + "transfer": [ + { + "organizationFiscalCode": "string", + "idTransfer": "1", + "amount": 1005, + "remittanceInformation": "string", + "category": null, + "iban": null, + "stamp": { + "hashDocument": "f2aca93b80cae681221f04", + "stampType": "01", + "provincialResidence": "RM" + }, + "postalIban": "string", + "insertedDate": "2022-02-24T17:03:59.408Z", + "status": "T_UNREPORTED", + "lastUpdatedDate": "2022-02-24T17:03:59.408Z", + "transferMetadata": [ + { + "key": "string", + "value": "string" + } + ] + } + ] +} From 81e3c04fe2ef7e6fc8488505615a3e7279b4ecf2 Mon Sep 17 00:00:00 2001 From: AngeloCaporaso Date: Thu, 6 Jun 2024 10:42:18 +0200 Subject: [PATCH 7/9] [PAGOPA-1800] fix --- .../payments/service/PartnerService.java | 359 ++++++++++-------- 1 file changed, 203 insertions(+), 156 deletions(-) diff --git a/src/main/java/it/gov/pagopa/payments/service/PartnerService.java b/src/main/java/it/gov/pagopa/payments/service/PartnerService.java index 19395360..114dd89c 100644 --- a/src/main/java/it/gov/pagopa/payments/service/PartnerService.java +++ b/src/main/java/it/gov/pagopa/payments/service/PartnerService.java @@ -46,6 +46,7 @@ import it.gov.pagopa.payments.model.spontaneous.*; import it.gov.pagopa.payments.utils.CommonUtil; import it.gov.pagopa.payments.utils.CustomizedMapper; +import it.gov.pagopa.payments.utils.Validator; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; @@ -67,8 +68,6 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLStreamException; - -import it.gov.pagopa.payments.utils.Validator; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -96,7 +95,7 @@ public class PartnerService { public static final String STATUS_PROPERTY = "status"; public static final String PAYMENT_DATE_PROPERTY = "paymentDate"; - + public static final String IBAN_APPOGGIO_KEY = "IBANAPPOGGIO"; @Value(value = "${xsd.generic-service}") @@ -130,8 +129,7 @@ public PaVerifyPaymentNoticeRes paVerifyPaymentNotice(PaVerifyPaymentNoticeReq r try { paymentOption = - gpdClient.getPaymentOption( - request.getIdPA(), request.getQrCode().getNoticeNumber()); + gpdClient.getPaymentOption(request.getIdPA(), request.getQrCode().getNoticeNumber()); } catch (FeignException.NotFound e) { log.error( "[paVerifyPaymentNotice] GPD Error not found [noticeNumber={}]", @@ -297,7 +295,9 @@ private PaDemandPaymentNoticeResponse createPaDemandPaymentNoticeResponse( result.setCompanyName(Validator.validateCompanyName(gpsResponse.getCompanyName())); result.setOfficeName(Validator.validateOfficeName(gpsResponse.getOfficeName())); - result.setPaymentDescription(Validator.validatePaymentOptionDescription(gpsResponse.getPaymentOption().get(0).getDescription())); + result.setPaymentDescription( + Validator.validatePaymentOptionDescription( + gpsResponse.getPaymentOption().get(0).getDescription())); CtPaymentOptionsDescriptionListPA ctPaymentOptionsDescriptionListPA = factory.createCtPaymentOptionsDescriptionListPA(); @@ -321,7 +321,9 @@ private PaDemandPaymentNoticeResponse createPaDemandPaymentNoticeResponse( DatatypeFactory.newInstance().newXMLGregorianCalendar(String.valueOf(date))); ctPaymentOptionDescriptionPA.setOptions(StAmountOption.EQ); - ctPaymentOptionDescriptionPA.setDetailDescription(Validator.validatePaymentOptionDescription(gpsResponse.getPaymentOption().get(0).getDescription())); + ctPaymentOptionDescriptionPA.setDetailDescription( + Validator.validatePaymentOptionDescription( + gpsResponse.getPaymentOption().get(0).getDescription())); ctPaymentOptionsDescriptionListPA.setPaymentOptionDescription(ctPaymentOptionDescriptionPA); result.setPaymentList(ctPaymentOptionsDescriptionListPA); return result; @@ -333,7 +335,7 @@ private PaDemandPaymentNoticeResponse createPaDemandPaymentNoticeResponse( * @param paymentOption {@link PaymentsModelResponse} response from GPD */ private void checkDebtPositionStatus(PaymentsModelResponse paymentOption) { - String iuvLog = " [iuv=" + paymentOption.getIuv() + ", nav=" +paymentOption.getNav()+ "]"; + String iuvLog = " [iuv=" + paymentOption.getIuv() + ", nav=" + paymentOption.getNav() + "]"; if (paymentOption.getDebtPositionStatus().equals(DebtPositionStatus.EXPIRED)) { log.error(DEBT_POSITION_STATUS_ERROR + paymentOption.getDebtPositionStatus() + iuvLog); throw new PartnerValidationException(PaaErrorEnum.PAA_PAGAMENTO_SCADUTO); @@ -375,17 +377,22 @@ private PaGetPaymentRes generatePaGetPaymentResponse( responseData.setPaymentAmount(BigDecimal.valueOf(source.getAmount())); DatatypeFactory datatypeFactory = DatatypeFactory.newInstance(); - XMLGregorianCalendar dueDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getDueDate())); + XMLGregorianCalendar dueDateXMLGregorian = + datatypeFactory.newXMLGregorianCalendar( + CommonUtil.convertToGregorianCalendar(source.getDueDate())); responseData.setDueDate(dueDateXMLGregorian); - if(source.getRetentionDate() != null) { - XMLGregorianCalendar retentionDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getRetentionDate())); + if (source.getRetentionDate() != null) { + XMLGregorianCalendar retentionDateXMLGregorian = + datatypeFactory.newXMLGregorianCalendar( + CommonUtil.convertToGregorianCalendar(source.getRetentionDate())); retentionDateXMLGregorian.setTimezone(DatatypeConstants.FIELD_UNDEFINED); responseData.setRetentionDate(retentionDateXMLGregorian); } responseData.setLastPayment(false); // de-scoping - responseData.setDescription(Validator.validatePaymentOptionDescription(source.getDescription())); + responseData.setDescription( + Validator.validatePaymentOptionDescription(source.getDescription())); responseData.setCompanyName(Validator.validateCompanyName(source.getCompanyName())); responseData.setOfficeName(Validator.validateOfficeName(source.getOfficeName())); @@ -435,22 +442,28 @@ private PaGetPaymentV2Response generatePaGetPaymentResponse( responseData.setPaymentAmount(BigDecimal.valueOf(source.getAmount())); DatatypeFactory datatypeFactory = DatatypeFactory.newInstance(); - XMLGregorianCalendar dueDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getDueDate())); + XMLGregorianCalendar dueDateXMLGregorian = + datatypeFactory.newXMLGregorianCalendar( + CommonUtil.convertToGregorianCalendar(source.getDueDate())); responseData.setDueDate(dueDateXMLGregorian); - if(source.getRetentionDate() != null) { - XMLGregorianCalendar retentionDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getRetentionDate())); + if (source.getRetentionDate() != null) { + XMLGregorianCalendar retentionDateXMLGregorian = + datatypeFactory.newXMLGregorianCalendar( + CommonUtil.convertToGregorianCalendar(source.getRetentionDate())); retentionDateXMLGregorian.setTimezone(DatatypeConstants.FIELD_UNDEFINED); responseData.setRetentionDate(retentionDateXMLGregorian); } responseData.setLastPayment(false); // de-scoping - responseData.setDescription(Validator.validatePaymentOptionDescription(source.getDescription())); + responseData.setDescription( + Validator.validatePaymentOptionDescription(source.getDescription())); responseData.setCompanyName(Validator.validateCompanyName(source.getCompanyName())); responseData.setOfficeName(Validator.validateOfficeName(source.getOfficeName())); - List paymentOptionMetadataModels = source.getPaymentOptionMetadata(); - if(paymentOptionMetadataModels != null && !paymentOptionMetadataModels.isEmpty()) { + List paymentOptionMetadataModels = + source.getPaymentOptionMetadata(); + if (paymentOptionMetadataModels != null && !paymentOptionMetadataModels.isEmpty()) { CtMetadata paymentOptionMetadata = factory.createCtMetadata(); List poMapEntry = paymentOptionMetadata.getMapEntry(); for (PaymentOptionMetadataModel po : paymentOptionMetadataModels) { @@ -505,7 +518,8 @@ private PaVerifyPaymentNoticeRes generatePaVerifyPaymentNoticeResponse( paymentOption.setDueDate( DatatypeFactory.newInstance() .newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getDueDate()))); - paymentOption.setDetailDescription(Validator.validatePaymentOptionDescription(source.getDescription())); + paymentOption.setDetailDescription( + Validator.validatePaymentOptionDescription(source.getDescription())); var cpp = source .getTransfer() @@ -517,7 +531,8 @@ private PaVerifyPaymentNoticeRes generatePaVerifyPaymentNoticeResponse( result.setPaymentList(paymentList); // general info result.setFiscalCodePA(source.getOrganizationFiscalCode()); - result.setPaymentDescription(Validator.validatePaymentOptionDescription(source.getDescription())); + result.setPaymentDescription( + Validator.validatePaymentOptionDescription(source.getDescription())); result.setCompanyName(Validator.validateCompanyName(source.getCompanyName())); result.setOfficeName(Validator.validateOfficeName(source.getOfficeName())); return result; @@ -551,8 +566,11 @@ private CtTransferPAV2 getTransferResponseV2( Stamp stamp = transfer.getStamp(); CtRichiestaMarcaDaBollo richiestaMarcaDaBollo = null; - if(stamp.getHashDocument() != null && stamp.getStampType() != null && stamp.getProvincialResidence() != null) - richiestaMarcaDaBollo = customizedModelMapper.map(transfer.getStamp(), CtRichiestaMarcaDaBollo.class); + if (stamp != null + && stamp.getHashDocument() != null + && stamp.getStampType() != null + && stamp.getProvincialResidence() != null) + richiestaMarcaDaBollo = customizedModelMapper.map(stamp, CtRichiestaMarcaDaBollo.class); CtTransferPAV2 transferPA = new CtTransferPAV2(); transferPA.setFiscalCodePA(transfer.getOrganizationFiscalCode()); @@ -563,7 +581,7 @@ private CtTransferPAV2 getTransferResponseV2( transferPA.setTransferCategory(transfer.getCategory()); List transferMetadataModels = transfer.getTransferMetadata(); - if(transferMetadataModels != null && !transferMetadataModels.isEmpty()) { + if (transferMetadataModels != null && !transferMetadataModels.isEmpty()) { CtMetadata ctMetadata = new CtMetadata(); List transferMapEntry = ctMetadata.getMapEntry(); for (TransferMetadataModel transferMetadataModel : transferMetadataModels) { @@ -571,17 +589,16 @@ private CtTransferPAV2 getTransferResponseV2( } transferPA.setMetadata(ctMetadata); } - + // PagoPA-1624: only two cases PAGOPA or POSTAL if (transferType != null && transferType.value().equals(StTransferType.PAGOPA.value())) { - Optional.ofNullable(transfer.getPostalIban()).ifPresent( - value -> createIbanAppoggioMetadata(transferPA, value) - ); - transferPA.setIBAN(transfer.getIban()); + Optional.ofNullable(transfer.getPostalIban()) + .ifPresent(value -> createIbanAppoggioMetadata(transferPA, value)); + transferPA.setIBAN(transfer.getIban()); } else { - transferPA.setIBAN(getIbanByTransferType(transferType, transfer)); + transferPA.setIBAN(getIbanByTransferType(transferType, transfer)); } - + return transferPA; } @@ -604,26 +621,26 @@ private CtMapEntry getTransferMetadata(TransferMetadataModel metadataModel) { * https://pagopa.atlassian.net/wiki/spaces/PAG/pages/96403906/paGetPayment#trasferType */ private String getIbanByTransferType( - StTransferType transferType, PaymentsTransferModelResponse transfer) { + StTransferType transferType, PaymentsTransferModelResponse transfer) { - String defaultIban = - Optional.ofNullable(transfer.getIban()) - .orElseGet(() -> Optional.ofNullable(transfer.getPostalIban()).orElseGet(() -> null)); + String defaultIban = + Optional.ofNullable(transfer.getIban()) + .orElseGet(() -> Optional.ofNullable(transfer.getPostalIban()).orElseGet(() -> null)); - return transferType != null - && transferType.value().equals(StTransferType.POSTAL.value()) - && transfer.getPostalIban() != null - ? transfer.getPostalIban() - : defaultIban; + return transferType != null + && transferType.value().equals(StTransferType.POSTAL.value()) + && transfer.getPostalIban() != null + ? transfer.getPostalIban() + : defaultIban; } - + private void createIbanAppoggioMetadata(CtTransferPAV2 transferPA, String value) { - CtMapEntry mapEntry = new CtMapEntry(); - mapEntry.setKey(IBAN_APPOGGIO_KEY); - mapEntry.setValue(value); - CtMetadata ctMetadata = Optional.ofNullable(transferPA.getMetadata()).orElse(new CtMetadata()); - ctMetadata.getMapEntry().add(mapEntry); - transferPA.setMetadata(ctMetadata); + CtMapEntry mapEntry = new CtMapEntry(); + mapEntry.setKey(IBAN_APPOGGIO_KEY); + mapEntry.setValue(value); + CtMetadata ctMetadata = Optional.ofNullable(transferPA.getMetadata()).orElse(new CtMetadata()); + ctMetadata.getMapEntry().add(mapEntry); + transferPA.setMetadata(ctMetadata); } private PaSendRTRes generatePaSendRTResponse() { @@ -689,7 +706,8 @@ private ReceiptEntity getReceipt(String organizationFiscalCode, String iuv) return ConvertTableEntityToReceiptEntity.mapTableEntityToReceiptEntity(tableEntity); } catch (TableServiceException e) { log.error(DBERROR, e); - if (e.getValue().getErrorCode() == TableErrorCode.RESOURCE_NOT_FOUND) return null; else throw new AppException(AppError.DB_ERROR); + if (e.getValue().getErrorCode() == TableErrorCode.RESOURCE_NOT_FOUND) return null; + else throw new AppException(AppError.DB_ERROR); } } @@ -765,140 +783,165 @@ private PaymentsModelResponse manageGetPaymentRequest(String idPa, CtQrCode qrCo private PaymentOptionModelResponse managePaSendRtRequest(PaSendRTReq request) { log.debug( - "[managePaSendRtRequest] save receipt [noticeNumber={}]", - request.getReceipt().getNoticeNumber()); + "[managePaSendRtRequest] save receipt [noticeNumber={}]", + request.getReceipt().getNoticeNumber()); String debtorIdentifier = - Optional.ofNullable(request.getReceipt().getDebtor()) - .map(CtSubject::getUniqueIdentifier) - .map(CtEntityUniqueIdentifier::getEntityUniqueIdentifierValue) - .orElse(""); + Optional.ofNullable(request.getReceipt().getDebtor()) + .map(CtSubject::getUniqueIdentifier) + .map(CtEntityUniqueIdentifier::getEntityUniqueIdentifierValue) + .orElse(""); ReceiptEntity receiptEntity = - this.getReceiptEntity( - request.getIdPA(), - request.getReceipt().getCreditorReferenceId(), - debtorIdentifier, - request.getReceipt().getPaymentDateTime().toString()); + this.getReceiptEntity( + request.getIdPA(), + request.getReceipt().getCreditorReferenceId(), + debtorIdentifier, + request.getReceipt().getPaymentDateTime().toString()); try { receiptEntity.setDocument(this.marshal(request)); } catch (JAXBException e) { log.error( - "[managePaSendRtRequest] Error in receipt marshalling [noticeNumber={}]", - request.getReceipt().getNoticeNumber(), - e); + "[managePaSendRtRequest] Error in receipt marshalling [noticeNumber={}]", + request.getReceipt().getNoticeNumber(), + e); throw new PartnerValidationException(PaaErrorEnum.PAA_SYSTEM_ERROR); } LocalDateTime paymentDateTime = - request.getReceipt().getPaymentDateTime() != null - ? request - .getReceipt() - .getPaymentDateTime() - .toGregorianCalendar() - .toZonedDateTime() - .toLocalDateTime() - : null; + request.getReceipt().getPaymentDateTime() != null + ? request + .getReceipt() + .getPaymentDateTime() + .toGregorianCalendar() + .toZonedDateTime() + .toLocalDateTime() + : null; PaymentOptionModel body = - PaymentOptionModel.builder() - .idReceipt(request.getReceipt().getReceiptId()) - .paymentDate(paymentDateTime) - .pspCompany(request.getReceipt().getPSPCompanyName()) - .paymentMethod(request.getReceipt().getPaymentMethod()) - .fee(String.valueOf(this.getFeeInCent(request.getReceipt().getFee()))) - .build(); + PaymentOptionModel.builder() + .idReceipt(request.getReceipt().getReceiptId()) + .paymentDate(paymentDateTime) + .pspCompany(request.getReceipt().getPSPCompanyName()) + .paymentMethod(request.getReceipt().getPaymentMethod()) + .fee(String.valueOf(this.getFeeInCent(request.getReceipt().getFee()))) + .build(); return this.getReceiptExceptionHandling( - request.getReceipt().getNoticeNumber(), - request.getIdPA(), - request.getReceipt().getCreditorReferenceId(), - body, - receiptEntity); + request.getReceipt().getNoticeNumber(), + request.getIdPA(), + request.getReceipt().getCreditorReferenceId(), + body, + receiptEntity); } private PaymentOptionModelResponse managePaSendRtRequest(PaSendRTV2Request request) { log.debug( - "[managePaSendRtRequest] save V2 receipt [noticeNumber={}]", - request.getReceipt().getNoticeNumber()); + "[managePaSendRtRequest] save V2 receipt [noticeNumber={}]", + request.getReceipt().getNoticeNumber()); String debtorIdentifier = - Optional.ofNullable(request.getReceipt().getDebtor()) - .map(CtSubject::getUniqueIdentifier) - .map(CtEntityUniqueIdentifier::getEntityUniqueIdentifierValue) - .orElse(""); + Optional.ofNullable(request.getReceipt().getDebtor()) + .map(CtSubject::getUniqueIdentifier) + .map(CtEntityUniqueIdentifier::getEntityUniqueIdentifierValue) + .orElse(""); ReceiptEntity receiptEntity = - this.getReceiptEntity( - request.getIdPA(), - request.getReceipt().getCreditorReferenceId(), - debtorIdentifier, - request.getReceipt().getPaymentDateTime().toString()); + this.getReceiptEntity( + request.getIdPA(), + request.getReceipt().getCreditorReferenceId(), + debtorIdentifier, + request.getReceipt().getPaymentDateTime().toString()); try { receiptEntity.setDocument(this.marshalV2(request)); } catch (JAXBException e) { log.error( - "[managePaSendRtRequest] Error in receipt marshalling [noticeNumber={}]", - request.getReceipt().getNoticeNumber(), - e); + "[managePaSendRtRequest] Error in receipt marshalling [noticeNumber={}]", + request.getReceipt().getNoticeNumber(), + e); throw new PartnerValidationException(PaaErrorEnum.PAA_SYSTEM_ERROR); } LocalDateTime paymentDateTime = - request.getReceipt().getPaymentDateTime() != null - ? request - .getReceipt() - .getPaymentDateTime() - .toGregorianCalendar() - .toZonedDateTime() - .toLocalDateTime() - : null; + request.getReceipt().getPaymentDateTime() != null + ? request + .getReceipt() + .getPaymentDateTime() + .toGregorianCalendar() + .toZonedDateTime() + .toLocalDateTime() + : null; PaymentOptionModel body = - PaymentOptionModel.builder() - .idReceipt(request.getReceipt().getReceiptId()) - .paymentDate(paymentDateTime) - .pspCompany(request.getReceipt().getPSPCompanyName()) - .paymentMethod(request.getReceipt().getPaymentMethod()) - .fee(String.valueOf(this.getFeeInCent(request.getReceipt().getFee()))) - .build(); + PaymentOptionModel.builder() + .idReceipt(request.getReceipt().getReceiptId()) + .paymentDate(paymentDateTime) + .pspCompany(request.getReceipt().getPSPCompanyName()) + .paymentMethod(request.getReceipt().getPaymentMethod()) + .fee(String.valueOf(this.getFeeInCent(request.getReceipt().getFee()))) + .build(); return this.getReceiptExceptionHandling( - request.getReceipt().getNoticeNumber(), - request.getIdPA(), - request.getReceipt().getCreditorReferenceId(), - body, - receiptEntity); - } - - private PaymentOptionModelResponse getReceiptExceptionHandling(String noticeNumber, - String idPa, - String creditorReferenceId, - PaymentOptionModel body, - ReceiptEntity receiptEntity ) { + request.getReceipt().getNoticeNumber(), + request.getIdPA(), + request.getReceipt().getCreditorReferenceId(), + body, + receiptEntity); + } + + private PaymentOptionModelResponse getReceiptExceptionHandling( + String noticeNumber, + String idPa, + String creditorReferenceId, + PaymentOptionModel body, + ReceiptEntity receiptEntity) { try { return this.getReceiptPaymentOption( - noticeNumber, - idPa, - creditorReferenceId, - body, - receiptEntity); + noticeNumber, idPa, creditorReferenceId, body, receiptEntity); } catch (RetryableException e) { - log.error("[getReceiptPaymentOption] PAA_SYSTEM_ERROR: GPD Not Reachable [noticeNumber={}]", noticeNumber, e); - queueClient.sendMessageWithResponse(receiptEntity.getDocument(), Duration.ofSeconds(queueSendInvisibilityTime), null, null, Context.NONE); + log.error( + "[getReceiptPaymentOption] PAA_SYSTEM_ERROR: GPD Not Reachable [noticeNumber={}]", + noticeNumber, + e); + queueClient.sendMessageWithResponse( + receiptEntity.getDocument(), + Duration.ofSeconds(queueSendInvisibilityTime), + null, + null, + Context.NONE); throw new PartnerValidationException(PaaErrorEnum.PAA_SYSTEM_ERROR); } catch (FeignException e) { - log.error("[getReceiptPaymentOption] PAA_SEMANTICA: GPD Error Response [noticeNumber={}]", noticeNumber, e); - queueClient.sendMessageWithResponse(receiptEntity.getDocument(), Duration.ofSeconds(queueSendInvisibilityTime), null, null, Context.NONE); + log.error( + "[getReceiptPaymentOption] PAA_SEMANTICA: GPD Error Response [noticeNumber={}]", + noticeNumber, + e); + queueClient.sendMessageWithResponse( + receiptEntity.getDocument(), + Duration.ofSeconds(queueSendInvisibilityTime), + null, + null, + Context.NONE); throw new PartnerValidationException(PaaErrorEnum.PAA_SEMANTICA); } catch (StorageException e) { - log.error("[getReceiptPaymentOption] PAA_SYSTEM_ERROR: Storage exception [noticeNumber={}]", noticeNumber, e); - queueClient.sendMessageWithResponse(receiptEntity.getDocument(), Duration.ofSeconds(queueSendInvisibilityTime), null, null, Context.NONE); + log.error( + "[getReceiptPaymentOption] PAA_SYSTEM_ERROR: Storage exception [noticeNumber={}]", + noticeNumber, + e); + queueClient.sendMessageWithResponse( + receiptEntity.getDocument(), + Duration.ofSeconds(queueSendInvisibilityTime), + null, + null, + Context.NONE); throw new PartnerValidationException(PaaErrorEnum.PAA_SYSTEM_ERROR); } catch (PartnerValidationException e) { // { PAA_RECEIPT_DUPLICATA, PAA_PAGAMENTO_SCONOSCIUTO } throw e; } catch (Exception e) { - // no retry because the long-term retry is enabled only when there is a gpd-core error response or a storage communication failure - log.error("[getReceiptPaymentOption] PAA_SYSTEM_ERROR: GPD Generic Error [noticeNumber={}]", noticeNumber, e); + // no retry because the long-term retry is enabled only when there is a gpd-core error + // response or a storage communication failure + log.error( + "[getReceiptPaymentOption] PAA_SYSTEM_ERROR: GPD Generic Error [noticeNumber={}]", + noticeNumber, + e); throw new PartnerValidationException(PaaErrorEnum.PAA_SYSTEM_ERROR); } } @@ -912,11 +955,13 @@ private ReceiptEntity getReceiptEntity( return receiptEntity; } - private PaymentOptionModelResponse getReceiptPaymentOption(String noticeNumber, - String idPa, - String creditorReferenceId, - PaymentOptionModel body, - ReceiptEntity receiptEntity) throws FeignException, URISyntaxException, InvalidKeyException, StorageException { + private PaymentOptionModelResponse getReceiptPaymentOption( + String noticeNumber, + String idPa, + String creditorReferenceId, + PaymentOptionModel body, + ReceiptEntity receiptEntity) + throws FeignException, URISyntaxException, InvalidKeyException, StorageException { PaymentOptionModelResponse paymentOption = new PaymentOptionModelResponse(); try { paymentOption = gpdClient.receiptPaymentOption(idPa, noticeNumber, body); @@ -932,35 +977,37 @@ private PaymentOptionModelResponse getReceiptPaymentOption(String noticeNumber, noticeNumber, e); ReceiptEntity receiptEntityToCreate = this.getReceipt(idPa, creditorReferenceId); - if (null == receiptEntityToCreate){ - // if no receipt found --> save the with PAID receipt - this.saveReceipt(receiptEntity); - } + if (null == receiptEntityToCreate) { + // if no receipt found --> save the with PAID receipt + this.saveReceipt(receiptEntity); + } } catch (Exception ex) { log.error( "[getReceiptPaymentOption] GPD Generic Error [noticeNumber={}] during receipt status" + " save", - noticeNumber, + noticeNumber, e); } throw new PartnerValidationException(PaaErrorEnum.PAA_RECEIPT_DUPLICATA); } catch (FeignException.NotFound e) { - log.error( - "[getReceiptPaymentOption] PAA_PAGAMENTO_SCONOSCIUTO: GPD Not Found Error Response [noticeNumber={}]", - noticeNumber, - e); - throw new PartnerValidationException(PaaErrorEnum.PAA_PAGAMENTO_SCONOSCIUTO); + log.error( + "[getReceiptPaymentOption] PAA_PAGAMENTO_SCONOSCIUTO: GPD Not Found Error Response [noticeNumber={}]", + noticeNumber, + e); + throw new PartnerValidationException(PaaErrorEnum.PAA_PAGAMENTO_SCONOSCIUTO); } catch (PartnerValidationException e) { - throw e; + throw e; } return paymentOption; } - public PaymentOptionModelResponse getReceiptPaymentOptionScheduler(String noticeNumber, - String idPa, - String creditorReferenceId, - PaymentOptionModel body, - ReceiptEntity receiptEntity) throws FeignException, URISyntaxException, InvalidKeyException, StorageException { + public PaymentOptionModelResponse getReceiptPaymentOptionScheduler( + String noticeNumber, + String idPa, + String creditorReferenceId, + PaymentOptionModel body, + ReceiptEntity receiptEntity) + throws FeignException, URISyntaxException, InvalidKeyException, StorageException { return getReceiptPaymentOption(noticeNumber, idPa, creditorReferenceId, body, receiptEntity); } } From 9f9b4cbf93c02fde1a96543b4eb19ed1e59971bf Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 6 Jun 2024 08:43:27 +0000 Subject: [PATCH 8/9] Bump to version 0.12.23-4-PAGOPA-1800 [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 a81cafa0..f2c3f705 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-gpd-payments description: Microservice that exposes API for payment receipts retrieving and other operations type: application -version: 0.100.0 -appVersion: 0.12.23-3-PAGOPA-1800 +version: 0.101.0 +appVersion: 0.12.23-4-PAGOPA-1800 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index aaea71e1..34ce9bd3 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-3-PAGOPA-1800" + tag: "0.12.23-4-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index ec818dc6..a2513ef0 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-3-PAGOPA-1800" + tag: "0.12.23-4-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index bed58834..3b18149a 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-3-PAGOPA-1800" + tag: "0.12.23-4-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 2a574843..7c2fe910 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "PagoPA API Payments", "description": "Payments", "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.12.23-3-PAGOPA-1800" + "version": "0.12.23-4-PAGOPA-1800" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 96779639..36485466 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa payments - 0.12.23-3-PAGOPA-1800 + 0.12.23-4-PAGOPA-1800 Payments Payments From 7e97021addc3d8fa645c052e4bfbd0105f539f42 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 6 Jun 2024 08:46:11 +0000 Subject: [PATCH 9/9] Bump to version 0.12.23-5-PAGOPA-1800 [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 f2c3f705..a55bd88a 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-gpd-payments description: Microservice that exposes API for payment receipts retrieving and other operations type: application -version: 0.101.0 -appVersion: 0.12.23-4-PAGOPA-1800 +version: 0.102.0 +appVersion: 0.12.23-5-PAGOPA-1800 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 34ce9bd3..d84d7f96 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-4-PAGOPA-1800" + tag: "0.12.23-5-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index a2513ef0..9069a93c 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-4-PAGOPA-1800" + tag: "0.12.23-5-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3b18149a..e65cca3d 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-gpd-payments - tag: "0.12.23-4-PAGOPA-1800" + tag: "0.12.23-5-PAGOPA-1800" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 7c2fe910..31ec788f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "title": "PagoPA API Payments", "description": "Payments", "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.12.23-4-PAGOPA-1800" + "version": "0.12.23-5-PAGOPA-1800" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 36485466..753e138c 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa payments - 0.12.23-4-PAGOPA-1800 + 0.12.23-5-PAGOPA-1800 Payments Payments