diff --git a/src/main/docs/openapi/api-selfcare-onboarding-docs.json b/src/main/docs/openapi/api-selfcare-onboarding-docs.json index 86225e8b..7c917503 100644 --- a/src/main/docs/openapi/api-selfcare-onboarding-docs.json +++ b/src/main/docs/openapi/api-selfcare-onboarding-docs.json @@ -2461,6 +2461,9 @@ }, "additionalInformations": { "$ref": "#/components/schemas/AdditionalInformationsDto" + }, + "gpuData" : { + "$ref" : "#/components/schemas/GPUData" } } }, @@ -2945,6 +2948,35 @@ } } }, + "GPUData" : { + "type" : "object", + "properties" : { + "businessRegisterNumber" : { + "type" : "string" + }, + "legalRegisterNumber" : { + "type" : "string" + }, + "legalRegisterName" : { + "type" : "string" + }, + "manager" : { + "type" : "boolean" + }, + "managerAuthorized" : { + "type" : "boolean" + }, + "managerEligible" : { + "type" : "boolean" + }, + "managerProsecution" : { + "type" : "boolean" + }, + "institutionCourtMeasures" : { + "type" : "boolean" + } + } + }, "ReasonRequest": { "type": "object", "properties": { diff --git a/src/main/java/it/pagopa/selfcare/external_api/mapper/OnboardingResourceMapper.java b/src/main/java/it/pagopa/selfcare/external_api/mapper/OnboardingResourceMapper.java index 0a8ab9dc..c562f825 100644 --- a/src/main/java/it/pagopa/selfcare/external_api/mapper/OnboardingResourceMapper.java +++ b/src/main/java/it/pagopa/selfcare/external_api/mapper/OnboardingResourceMapper.java @@ -17,6 +17,7 @@ public interface OnboardingResourceMapper { @Mapping(source = "billingData.registeredOffice", target = "institutionUpdate.address") @Mapping(source = "pspData", target = "institutionUpdate.paymentServiceProvider") @Mapping(source = "pspData.dpoData", target = "institutionUpdate.dataProtectionOfficer") + @Mapping(source = "gpuData", target = "institutionUpdate.gpuData") @Mapping(source = "geographicTaxonomies", target = "institutionUpdate.geographicTaxonomies") @Mapping(source = "companyInformations.rea", target = "institutionUpdate.rea") @Mapping(source = "companyInformations.shareCapital", target = "institutionUpdate.shareCapital") diff --git a/src/main/java/it/pagopa/selfcare/external_api/model/institution/GPUData.java b/src/main/java/it/pagopa/selfcare/external_api/model/institution/GPUData.java new file mode 100644 index 00000000..cc873160 --- /dev/null +++ b/src/main/java/it/pagopa/selfcare/external_api/model/institution/GPUData.java @@ -0,0 +1,15 @@ +package it.pagopa.selfcare.external_api.model.institution; + +import lombok.Data; + +@Data +public class GPUData { + private String businessRegisterNumber; + private String legalRegisterNumber; + private String legalRegisterName; + private boolean manager; + private boolean managerAuthorized; + private boolean managerEligible; + private boolean managerProsecution; + private boolean institutionCourtMeasures; +} diff --git a/src/main/java/it/pagopa/selfcare/external_api/model/institution/Institution.java b/src/main/java/it/pagopa/selfcare/external_api/model/institution/Institution.java index b47754f4..3eb0ad95 100644 --- a/src/main/java/it/pagopa/selfcare/external_api/model/institution/Institution.java +++ b/src/main/java/it/pagopa/selfcare/external_api/model/institution/Institution.java @@ -34,6 +34,7 @@ public class Institution { private List attributes; private PaymentServiceProvider paymentServiceProvider; private DataProtectionOfficer dataProtectionOfficer; + private GPUData gpuData; private String rea; private String shareCapital; private String businessRegisterPlace; diff --git a/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/InstitutionUpdate.java b/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/InstitutionUpdate.java index ff3e8a72..66a3c970 100644 --- a/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/InstitutionUpdate.java +++ b/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/InstitutionUpdate.java @@ -1,5 +1,6 @@ package it.pagopa.selfcare.external_api.model.onboarding; +import it.pagopa.selfcare.external_api.model.institution.GPUData; import it.pagopa.selfcare.onboarding.common.InstitutionType; import it.pagopa.selfcare.external_api.model.institution.GeographicTaxonomy; import lombok.Data; @@ -20,6 +21,7 @@ public class InstitutionUpdate { private String zipCode; private PaymentServiceProvider paymentServiceProvider; private DataProtectionOfficer dataProtectionOfficer; + private GPUData gpuData; private List geographicTaxonomies; private String rea; private String shareCapital; diff --git a/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingProductDto.java b/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingProductDto.java index 0729a4d8..693d69dc 100644 --- a/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingProductDto.java +++ b/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingProductDto.java @@ -1,15 +1,15 @@ package it.pagopa.selfcare.external_api.model.onboarding; import io.swagger.annotations.ApiModelProperty; -import it.pagopa.selfcare.onboarding.common.InstitutionType; +import it.pagopa.selfcare.external_api.model.institution.GPUData; import it.pagopa.selfcare.external_api.model.institution.InstitutionLocationDataDto; import it.pagopa.selfcare.external_api.model.user.UserDto; -import lombok.Data; - +import it.pagopa.selfcare.onboarding.common.InstitutionType; +import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -import java.util.List; +import lombok.Data; @Data public class OnboardingProductDto { @@ -43,6 +43,10 @@ public class OnboardingProductDto { @Valid private PspDataDto pspData; + @ApiModelProperty(value = "${swagger.external_api.institutions.model.gpuData}") + @Valid + private GPUData gpuData; + @ApiModelProperty(value = "${swagger.external_api.institutions.model.geographicTaxonomies}", required = true) @NotNull @Valid diff --git a/src/main/resources/swagger/api-docs.json b/src/main/resources/swagger/api-docs.json index 630b8ca1..ac5a75aa 100644 --- a/src/main/resources/swagger/api-docs.json +++ b/src/main/resources/swagger/api-docs.json @@ -1471,6 +1471,36 @@ } } }, + "GPUData" : { + "title" : "GPUData", + "type" : "object", + "properties" : { + "businessRegisterNumber" : { + "type" : "string" + }, + "institutionCourtMeasures" : { + "type" : "boolean" + }, + "legalRegisterName" : { + "type" : "string" + }, + "legalRegisterNumber" : { + "type" : "string" + }, + "manager" : { + "type" : "boolean" + }, + "managerAuthorized" : { + "type" : "boolean" + }, + "managerEligible" : { + "type" : "boolean" + }, + "managerProsecution" : { + "type" : "boolean" + } + } + }, "GeographicTaxonomy" : { "title" : "GeographicTaxonomy", "type" : "object", @@ -1686,6 +1716,9 @@ "$ref" : "#/components/schemas/GeographicTaxonomy" } }, + "gpuData" : { + "$ref" : "#/components/schemas/GPUData" + }, "imported" : { "type" : "boolean" }, @@ -2052,6 +2085,10 @@ "$ref" : "#/components/schemas/GeographicTaxonomyDto" } }, + "gpuData" : { + "description" : "GPU specific data", + "$ref" : "#/components/schemas/GPUData" + }, "institutionLocationData" : { "description" : "Institution's location Data", "$ref" : "#/components/schemas/InstitutionLocationDataDto" diff --git a/src/main/resources/swagger/swagger_en.properties b/src/main/resources/swagger/swagger_en.properties index ceec3a62..aba40247 100644 --- a/src/main/resources/swagger/swagger_en.properties +++ b/src/main/resources/swagger/swagger_en.properties @@ -53,6 +53,7 @@ swagger.external_api.institutions.model.supportEmail=Institution's support email swagger.external_api.institutions.model.supportPhone=Institution's support phone contact swagger.external_api.institutions.model.imported=True if institution is stored from batch api swagger.external_api.institutions.model.pspData=Payment Service Provider (PSP) specific data +swagger.external_api.institutions.model.gpuData=GPU specific data swagger.external_api.institutions.model.companyInformations=GPS, SCP, PT optional data swagger.external_api.institutions.model.assistance=Institution's assistance contacts swagger.external_api.institutions.model.onboardingDate=Institution's old onboarding date in the format 2007-12-03T10:15:30+01:00 (YYYY-MM-DD-T-HH:mm:ss+UTC)