From 918ff9e3cba3cd0429bce9703b9a47e98b8f26dd Mon Sep 17 00:00:00 2001 From: empassaro <113031808+empassaro@users.noreply.github.com> Date: Wed, 22 May 2024 12:00:27 +0200 Subject: [PATCH] [SELC-4785] fix: added distinct billing in model of message to send (#93) --- .../connector/model/institution/BillingToSend.java | 10 ++++++++++ .../model/institution/NotificationToSend.java | 2 +- .../kafka_manager/factory/SendSapNotificationTest.java | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/BillingToSend.java diff --git a/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/BillingToSend.java b/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/BillingToSend.java new file mode 100644 index 00000000..f9b3af56 --- /dev/null +++ b/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/BillingToSend.java @@ -0,0 +1,10 @@ +package it.pagopa.selfcare.external_interceptor.connector.model.institution; + +import lombok.Data; + +@Data +public class BillingToSend { + private String vatNumber; + private String recipientCode; + private boolean publicService; +} diff --git a/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/NotificationToSend.java b/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/NotificationToSend.java index 10b7b097..32d0446e 100644 --- a/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/NotificationToSend.java +++ b/connector-api/src/main/java/it/pagopa/selfcare/external_interceptor/connector/model/institution/NotificationToSend.java @@ -21,7 +21,7 @@ public class NotificationToSend { private InstitutionToSend institution; private String fileName; private String contentType; - private Billing billing; + private BillingToSend billing; private UserToSend user; } diff --git a/connector/kafka-manager/src/test/java/it/pagopa/selfcare/external_interceptor/connector/kafka_manager/factory/SendSapNotificationTest.java b/connector/kafka-manager/src/test/java/it/pagopa/selfcare/external_interceptor/connector/kafka_manager/factory/SendSapNotificationTest.java index 078962b0..78571b5c 100644 --- a/connector/kafka-manager/src/test/java/it/pagopa/selfcare/external_interceptor/connector/kafka_manager/factory/SendSapNotificationTest.java +++ b/connector/kafka-manager/src/test/java/it/pagopa/selfcare/external_interceptor/connector/kafka_manager/factory/SendSapNotificationTest.java @@ -248,6 +248,7 @@ void sendInstitutionNotificationUo() throws JsonProcessingException { NotificationToSend captured = mapper.readValue(producerRecordArgumentCaptor.getValue().value(), NotificationToSend.class); checkNotNullFields(captured, "user"); checkNotNullFields(captured.getInstitution()); + assertEquals("setTaxCodeInvoicing", captured.getInstitution().getTaxCode()); } @Test