diff --git a/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java b/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java index 459c7e43e..06a41da04 100644 --- a/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java +++ b/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java @@ -353,7 +353,7 @@ public ResponseEntity updateInstitution(@ApiParam("${swagge @ApiOperation(value = "${swagger.mscore.onboarding.users}", notes = "${swagger.mscore.onboarding.users}") @PostMapping(value = "/{id}/onboarding") public ResponseEntity onboardingInstitution(@RequestBody @Valid InstitutionOnboardingRequest request, - @PathVariable("id") String id) { + @PathVariable("id") String id) { CustomExceptionMessage.setCustomMessage(GenericError.ONBOARDING_OPERATION_ERROR); List usersToOnboard = Optional.ofNullable(request.getUsers()) .map(users -> users.stream().map(userMapper::toUserToOnboard).toList()) diff --git a/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionRequest.java b/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionRequest.java index 3a614d7d5..7ee16e7cf 100644 --- a/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionRequest.java +++ b/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionRequest.java @@ -24,7 +24,6 @@ public class InstitutionRequest { private String country; private String taxCode; private String ivassCode; - private BillingRequest billing; private List onboarding; private List geographicTaxonomies; diff --git a/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionResponse.java b/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionResponse.java index 3ec25b1f9..f87cca22d 100644 --- a/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionResponse.java +++ b/web/src/main/java/it/pagopa/selfcare/mscore/web/model/institution/InstitutionResponse.java @@ -25,7 +25,6 @@ public class InstitutionResponse { private String digitalAddress; private String address; private String zipCode; - @NotBlank private String taxCode; private String city; private String county; diff --git a/web/src/test/java/it/pagopa/selfcare/mscore/web/controller/OnboardingControllerTest.java b/web/src/test/java/it/pagopa/selfcare/mscore/web/controller/OnboardingControllerTest.java index 39a99fbb0..829bb2f82 100644 --- a/web/src/test/java/it/pagopa/selfcare/mscore/web/controller/OnboardingControllerTest.java +++ b/web/src/test/java/it/pagopa/selfcare/mscore/web/controller/OnboardingControllerTest.java @@ -1,7 +1,6 @@ package it.pagopa.selfcare.mscore.web.controller; import com.fasterxml.jackson.databind.ObjectMapper; -import it.pagopa.selfcare.commons.base.security.PartyRole; import it.pagopa.selfcare.commons.base.security.SelfCareUser; import it.pagopa.selfcare.commons.base.utils.InstitutionType; import it.pagopa.selfcare.mscore.core.OnboardingService; @@ -11,14 +10,8 @@ import it.pagopa.selfcare.mscore.model.institution.InstitutionUpdate; import it.pagopa.selfcare.mscore.model.institution.PaymentServiceProvider; import it.pagopa.selfcare.mscore.model.onboarding.ResourceResponse; -import it.pagopa.selfcare.mscore.web.model.institution.BillingRequest; -import it.pagopa.selfcare.mscore.web.model.institution.DataProtectionOfficerRequest; -import it.pagopa.selfcare.mscore.web.model.institution.InstitutionUpdateRequest; -import it.pagopa.selfcare.mscore.web.model.institution.PaymentServiceProviderRequest; import it.pagopa.selfcare.mscore.web.model.mapper.*; -import it.pagopa.selfcare.mscore.web.model.onboarding.ContractRequest; import it.pagopa.selfcare.mscore.web.model.onboarding.OnboardingInstitutionOperatorsRequest; -import it.pagopa.selfcare.mscore.web.model.onboarding.OnboardingInstitutionRequest; import it.pagopa.selfcare.mscore.web.model.onboarding.OnboardingInstitutionUsersRequest; import it.pagopa.selfcare.mscore.web.model.user.Person; import org.junit.jupiter.api.BeforeEach; @@ -203,52 +196,6 @@ void testGetOnboardingDocument2() throws Exception { .andExpect(MockMvcResultMatchers.content().string("")); } - private OnboardingInstitutionRequest createOnboardingInstitutionRequest() { - BillingRequest billingRequest = new BillingRequest(); - billingRequest.setPublicServices(true); - billingRequest.setRecipientCode("Recipient Code"); - billingRequest.setVatNumber("42"); - - ContractRequest contractRequest = new ContractRequest(); - contractRequest.setPath("Path"); - contractRequest.setVersion("1.0.2"); - - InstitutionUpdateRequest institutionUpdate = new InstitutionUpdateRequest(); - institutionUpdate.setAddress("42 Main St"); - institutionUpdate.setDescription("The characteristics of someone or something"); - institutionUpdate.setDigitalAddress("42 Main St"); - List geographicTaxonomiesList = new ArrayList<>(); - institutionUpdate.setGeographicTaxonomyCodes(geographicTaxonomiesList); - institutionUpdate.setInstitutionType(InstitutionType.GSP); - institutionUpdate.setTaxCode("Tax Code"); - institutionUpdate.setZipCode("21654"); - institutionUpdate.setPaymentServiceProvider(new PaymentServiceProviderRequest()); - institutionUpdate.setDataProtectionOfficer(new DataProtectionOfficerRequest()); - - Person person = new Person(); - person.setId("42"); - person.setName("Name"); - person.setProductRole("Product Role"); - person.setRole(PartyRole.MANAGER); - person.setSurname("Doe"); - person.setTaxCode("Tax Code"); - - ArrayList personList = new ArrayList<>(); - personList.add(person); - - OnboardingInstitutionRequest onboardingInstitutionRequest = new OnboardingInstitutionRequest(); - onboardingInstitutionRequest.setUsers(personList); - onboardingInstitutionRequest.setBilling(billingRequest); - onboardingInstitutionRequest.setContract(contractRequest); - onboardingInstitutionRequest.setInstitutionExternalId("42"); - onboardingInstitutionRequest.setInstitutionUpdate(institutionUpdate); - onboardingInstitutionRequest.setPricingPlan("Pricing Plan"); - onboardingInstitutionRequest.setProductId("42"); - onboardingInstitutionRequest.setProductName("Product Name"); - - return onboardingInstitutionRequest; - } - /** * Method under test: {@link OnboardingController#onboardingInstitutionOperators(OnboardingInstitutionOperatorsRequest, Authentication)} */