Skip to content

Commit

Permalink
Merge pull request #82 from pagopa/fix-retention-date
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
cap-ang authored Dec 13, 2023
2 parents 06d721c + e2f40ce commit 8cab6f7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.61.0
appVersion: 0.12.2
version: 0.62.0
appVersion: 0.12.2-1-fix-retention-date
dependencies:
- name: microservice-chart
version: 2.4.0
Expand Down
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-gpd-payments
tag: "0.12.2"
tag: "0.12.2-1-fix-retention-date"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-gpd-payments
tag: "0.12.2"
tag: "0.12.2-1-fix-retention-date"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-gpd-payments
tag: "0.12.2"
tag: "0.12.2-1-fix-retention-date"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "PagoPA API Payments",
"description": "Payments",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.12.2"
"version": "0.12.2-1-fix-retention-date"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>it.gov.pagopa</groupId>
<artifactId>payments</artifactId>
<version>0.12.2</version>
<version>0.12.2-1-fix-retention-date</version>
<name>Payments</name>
<description>Payments</description>

Expand Down
12 changes: 7 additions & 5 deletions src/main/java/it/gov/pagopa/payments/service/PartnerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,14 @@ private PaGetPaymentV2Response generatePaGetPaymentResponse(

DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
XMLGregorianCalendar dueDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getDueDate()));
XMLGregorianCalendar retentionDateXMLGregorian = datatypeFactory.newXMLGregorianCalendar(CommonUtil.convertToGregorianCalendar(source.getRetentionDate()));
//dueDateXMLGregorian.setTimezone(DatatypeConstants.FIELD_UNDEFINED); TODO after update xsd to common:stISODateTime
retentionDateXMLGregorian.setTimezone(DatatypeConstants.FIELD_UNDEFINED);

responseData.setDueDate(dueDateXMLGregorian);
responseData.setRetentionDate(source.getRetentionDate() != null ? retentionDateXMLGregorian : null);

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(source.getDescription());
responseData.setCompanyName(Optional.ofNullable(source.getCompanyName()).orElse("NA"));
Expand Down

0 comments on commit 8cab6f7

Please sign in to comment.