Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated external services request data #13

Merged
merged 8 commits into from
Dec 17, 2024
Merged

Conversation

alessio-cialini
Copy link
Collaborator

@alessio-cialini alessio-cialini commented Dec 16, 2024

List of Changes

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@@ -1,5 +1,6 @@
package it.gov.pagopa.mbd.service.client;

import com.fasterxml.jackson.databind.ObjectMapper;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import com.fasterxml.jackson.databind.ObjectMapper;

@@ -3,20 +3,18 @@
import it.gov.pagopa.mbd.service.exception.CartMappingException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import it.gov.pagopa.mbd.service.exception.CartMappingException;
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;

Comment on lines 14 to +17
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.xml.transform.StringResult;

import java.math.RoundingMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.xml.transform.StringResult;
import java.math.RoundingMode;

@@ -32,33 +30,36 @@

PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);
PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);

Comment on lines +33 to 42
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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
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();

Comment on lines 2 to +5
// 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:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
// 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:00:54 PM CET
// 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

@@ -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.28 alle 03:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
//


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change

Comment on lines +35 to 64
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.ebollo
* 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 Ctebollo }
* Create an instance of {@link CtService }
*
*/
public Ctebollo createCtebollo() {
return new Ctebollo();
public CtService createCtService() {
return new CtService();
}

/**
* Create an instance of {@link CtDebitore }
*
*/
public CtDebitore createCtDebitore() {
return new CtDebitore();
}

/**
* Create an instance of {@link CtEnteCreditore }
*
*/
public CtEnteCreditore createCtEnteCreditore() {
return new CtEnteCreditore();
}

/**
* Create an instance of {@link CtHashDocumento }
*
*/
public CtHashDocumento createCtHashDocumento() {
return new CtHashDocumento();
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link Ctebollo }{@code >}
* 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 Ctebollo }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >}
*/
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/ebollo", name = "service")
public JAXBElement<Ctebollo> createService(Ctebollo value) {
return new JAXBElement<Ctebollo>(_Service_QNAME, Ctebollo.class, null, value);
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", name = "service")
public JAXBElement<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_Service_QNAME, CtService.class, null, value);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
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.ebollo
* 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 Ctebollo }
* Create an instance of {@link CtService }
*
*/
public Ctebollo createCtebollo() {
return new Ctebollo();
public CtService createCtService() {
return new CtService();
}
/**
* Create an instance of {@link CtDebitore }
*
*/
public CtDebitore createCtDebitore() {
return new CtDebitore();
}
/**
* Create an instance of {@link CtEnteCreditore }
*
*/
public CtEnteCreditore createCtEnteCreditore() {
return new CtEnteCreditore();
}
/**
* Create an instance of {@link CtHashDocumento }
*
*/
public CtHashDocumento createCtHashDocumento() {
return new CtHashDocumento();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Ctebollo }{@code >}
* 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 Ctebollo }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >}
*/
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/ebollo", name = "service")
public JAXBElement<Ctebollo> createService(Ctebollo value) {
return new JAXBElement<Ctebollo>(_Service_QNAME, Ctebollo.class, null, value);
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", name = "service")
public JAXBElement<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_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<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_Service_QNAME, CtService.class, null, value);
}

Comment on lines 2 to +5
// 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:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
// 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:00:54 PM CET
// 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/ebollo", 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
@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)

@@ -1,5 +1,6 @@
package it.gov.pagopa.mbd.service.client;

import com.fasterxml.jackson.databind.ObjectMapper;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import com.fasterxml.jackson.databind.ObjectMapper;

@@ -3,20 +3,18 @@
import it.gov.pagopa.mbd.service.exception.CartMappingException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import it.gov.pagopa.mbd.service.exception.CartMappingException;
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;

Comment on lines 14 to +17
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.xml.transform.StringResult;

import java.math.RoundingMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.xml.transform.StringResult;
import java.math.RoundingMode;

@@ -32,33 +30,36 @@

PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);
PaymentNotice paymentNotice = getMdbRequest.getPaymentNotices().get(0);

Comment on lines +33 to 42
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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
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();

Comment on lines 2 to +5
// 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:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
// 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:00:54 PM CET
// 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

@@ -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.28 alle 03:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
//


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change

Comment on lines +35 to 64
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.ebollo
* 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 Ctebollo }
* Create an instance of {@link CtService }
*
*/
public Ctebollo createCtebollo() {
return new Ctebollo();
public CtService createCtService() {
return new CtService();
}

/**
* Create an instance of {@link CtDebitore }
*
*/
public CtDebitore createCtDebitore() {
return new CtDebitore();
}

/**
* Create an instance of {@link CtEnteCreditore }
*
*/
public CtEnteCreditore createCtEnteCreditore() {
return new CtEnteCreditore();
}

/**
* Create an instance of {@link CtHashDocumento }
*
*/
public CtHashDocumento createCtHashDocumento() {
return new CtHashDocumento();
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link Ctebollo }{@code >}
* 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 Ctebollo }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >}
*/
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/ebollo", name = "service")
public JAXBElement<Ctebollo> createService(Ctebollo value) {
return new JAXBElement<Ctebollo>(_Service_QNAME, Ctebollo.class, null, value);
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", name = "service")
public JAXBElement<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_Service_QNAME, CtService.class, null, value);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
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.ebollo
* 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 Ctebollo }
* Create an instance of {@link CtService }
*
*/
public Ctebollo createCtebollo() {
return new Ctebollo();
public CtService createCtService() {
return new CtService();
}
/**
* Create an instance of {@link CtDebitore }
*
*/
public CtDebitore createCtDebitore() {
return new CtDebitore();
}
/**
* Create an instance of {@link CtEnteCreditore }
*
*/
public CtEnteCreditore createCtEnteCreditore() {
return new CtEnteCreditore();
}
/**
* Create an instance of {@link CtHashDocumento }
*
*/
public CtHashDocumento createCtHashDocumento() {
return new CtHashDocumento();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Ctebollo }{@code >}
* 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 Ctebollo }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link CtService }{@code >}
*/
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/ebollo", name = "service")
public JAXBElement<Ctebollo> createService(Ctebollo value) {
return new JAXBElement<Ctebollo>(_Service_QNAME, Ctebollo.class, null, value);
@XmlElementDecl(namespace = "http://PuntoAccessoPSP.spcoop.gov.it/GeneralService", name = "service")
public JAXBElement<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_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<CtService> createService(CtService value) {
return new JAXBElement<CtService>(_Service_QNAME, CtService.class, null, value);
}

Comment on lines 2 to +5
// 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:00:54 PM CET
// Generato il: 2024.12.12 alle 03:15:53 PM CET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
// 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:00:54 PM CET
// 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/ebollo", 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
@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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

public static GetCartRequest mapCartRequest(
GetMbdRequest request, DemandPaymentNoticeResponse demandPaymentNoticeResponse) {
try {
assertNotNull(demandPaymentNoticeResponse);
CtPaymentOptionsDescriptionList ctPaymentOptionsDescriptionList = demandPaymentNoticeResponse.getPaymentList();
assertNotNull(ctPaymentOptionsDescriptionList);
List<CtPaymentOptionDescription> 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);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

private String emailNotice;
private List<CartPaymentNotice> paymentNotices;
private ReturnUrls returnUrls;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

public static GetCartRequest mapCartRequest(
GetMbdRequest request, DemandPaymentNoticeResponse demandPaymentNoticeResponse) {
try {
assertNotNull(demandPaymentNoticeResponse);
CtPaymentOptionsDescriptionList ctPaymentOptionsDescriptionList = demandPaymentNoticeResponse.getPaymentList();
assertNotNull(ctPaymentOptionsDescriptionList);
List<CtPaymentOptionDescription> 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);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the it.gov.spcoop.puntoaccessopsp.generalservice package.
* <p>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.
*

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

private String emailNotice;
private List<CartPaymentNotice> paymentNotices;
private ReturnUrls returnUrls;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the it.gov.spcoop.puntoaccessopsp.generalservice package.
* <p>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.
*

@@ -13,4 +13,8 @@ public class GetCartResponse {

private String checkoutRedirectUrl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
private String checkoutRedirectUrl;
private String checkoutRedirectUrl;

Comment on lines +16 to +18
private String navDownloadLink;

private String mbdNav;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
private String navDownloadLink;
private String mbdNav;
private String navDownloadLink;

private String navDownloadLink;

private String mbdNav;

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
}
private String mbdNav;
}

Comment on lines +20 to 21
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

Comment on lines 28 to +33
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;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
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;

"organizations", fiscalCodeEC,
"receipt", noticeNumber));
return ResponseEntity.ok().header(CONTENT_TYPE, APPLICATION_JSON_VALUE).body(item);
});

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
}
private final String channelId;

Comment on lines 22 to 26
@Test
void homeTestSuccess() throws Exception {
webClient.get().exchange().expectStatus().is3xxRedirection();
webClient.get().exchange().expectStatus().is2xxSuccessful();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Suggested change
@Test
void homeTestSuccess() throws Exception {
webClient.get().exchange().expectStatus().is3xxRedirection();
webClient.get().exchange().expectStatus().is2xxSuccessful();
}
}
@Test
void homeTestSuccess() throws Exception {
webClient.get().exchange().expectStatus().is2xxSuccessful();
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

@Override
public Mono<ResponseEntity> getMbd(String fiscalCodeEC, GetMbdRequest request) {
HashMap<String, DemandPaymentNoticeResponse> hashMap = new HashMap();
return Mono.just(request)
.doFirst(() -> {
Set<ConstraintViolation<GetMbdRequest>> 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);
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

@Override
public Mono<ResponseEntity> 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 -> {
log.error("Encountered an error during getPaymentReceiptCall Call: {}", e.getMessage());
return Mono.error(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()));
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[google-java-format] reported by reviewdog 🐶

Copy link
Contributor

This PR exceeds the recommended size of 400 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@pasqualespica pasqualespica merged commit bb9f903 into main Dec 17, 2024
12 of 16 checks passed
@pasqualespica pasqualespica deleted the fix-dati-servizio branch December 17, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants