Skip to content

Commit

Permalink
[SELC-5513] feat: Added new fields for GPUData
Browse files Browse the repository at this point in the history
  • Loading branch information
giampieroferrara authored Nov 27, 2024
1 parent c36bdf4 commit 97da222
Show file tree
Hide file tree
Showing 15 changed files with 138 additions and 4 deletions.
34 changes: 34 additions & 0 deletions app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3609,6 +3609,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"
}
}
},
"GeographicTaxonomyDto" : {
"title" : "GeographicTaxonomyDto",
"required" : [ "code", "desc" ],
Expand Down Expand Up @@ -4001,6 +4031,10 @@
"$ref" : "#/components/schemas/GeographicTaxonomyDto"
}
},
"gpuData" : {
"description" : "Institution's GPU data",
"$ref" : "#/components/schemas/GPUData"
},
"institutionLocationData" : {
"description" : "Institution's location data, city, county, country information",
"$ref" : "#/components/schemas/InstitutionLocationDataDto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class Institution {
private List<Attribute> attributes;
private PaymentServiceProvider paymentServiceProvider;
private DataProtectionOfficer dataProtectionOfficer;
private GPUData gpuData;
private List<GeographicTaxonomy> geographicTaxonomies;
private CompanyInformations companyInformations;
private AssistanceContacts assistanceContacts;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package it.pagopa.selfcare.onboarding.connector.model.onboarding;

import lombok.Data;

@Data
public class BusinessData {

private String businessRegisterNumber;
private String legalRegisterNumber;
private String legalRegisterName;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package it.pagopa.selfcare.onboarding.connector.model.onboarding;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class GPUData extends BusinessData {

private boolean manager;
private boolean managerAuthorized;
private boolean managerEligible;
private boolean managerProsecution;
private boolean institutionCourtMeasures;

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class InstitutionUpdate {
private String originId;
private PaymentServiceProvider paymentServiceProvider;
private DataProtectionOfficer dataProtectionOfficer;
private GPUData gpuData;
private List<GeographicTaxonomy> geographicTaxonomies;
private String rea;
private String shareCapital;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package it.pagopa.selfcare.onboarding.connector.model.onboarding;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
public class PaymentServiceProvider {
@EqualsAndHashCode(callSuper = true)
public class PaymentServiceProvider extends BusinessData {

private String abiCode;
private String businessRegisterNumber;
private String legalRegisterName;
private String legalRegisterNumber;
private Boolean vatNumberGroup;

}
32 changes: 32 additions & 0 deletions connector/rest/docs/openapi/api-selfcare-onboarding-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2238,6 +2238,9 @@
},
"additionalInformations" : {
"$ref" : "#/components/schemas/AdditionalInformationsDto"
},
"gpuData": {
"$ref": "#/components/schemas/GPUData"
}
}
},
Expand Down Expand Up @@ -2813,6 +2816,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"
}
}
}
},
"securitySchemes" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public interface OnboardingMapper {
OnboardingPspRequest toOnboardingPspRequest(OnboardingData onboardingData);
@Mapping(target = "institution", source = ".", qualifiedByName = "toInstitutionBase")
@Mapping(target = "additionalInformations", source = "institutionUpdate.additionalInformations")
@Mapping(target = "gpuData", source = "institutionUpdate.gpuData")
OnboardingDefaultRequest toOnboardingDefaultRequest(OnboardingData onboardingData);

@Mapping(target = "businessName", source = "institutionUpdate.description")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import it.pagopa.selfcare.commons.base.utils.InstitutionType;
import it.pagopa.selfcare.onboarding.connector.model.institutions.Attribute;
import it.pagopa.selfcare.onboarding.connector.model.onboarding.DataProtectionOfficer;
import it.pagopa.selfcare.onboarding.connector.model.onboarding.GPUData;
import it.pagopa.selfcare.onboarding.connector.model.onboarding.GeographicTaxonomy;
import it.pagopa.selfcare.onboarding.connector.model.onboarding.PaymentServiceProvider;
import lombok.Data;
Expand Down Expand Up @@ -31,6 +32,7 @@ public class InstitutionResponse {
private List<Attribute> attributes;
private PaymentServiceProvider paymentServiceProvider;
private DataProtectionOfficer dataProtectionOfficer;
private GPUData gpuData;
private List<GeographicTaxonomy> geographicTaxonomies;
private List<OnboardingResponse> onboarding;
private String rea;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
"email": "string",
"pec": "string"
},
"gpuData": {
"businessRegisterNumber": "string",
"legalRegisterName": "string",
"legalRegisterNumber": "string",
"manager": false,
"managerAuthorized": false,
"managerEligible": false,
"managerProsecution": false,
"institutionCourtMeasures": false
},
"geographicTaxonomies": [
{
"code": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
"email": "string",
"pec": "string"
},
"gpuData": {
"businessRegisterNumber": "string",
"legalRegisterName": "string",
"legalRegisterNumber": "string",
"manager": false,
"managerAuthorized": false,
"managerEligible": false,
"managerProsecution": false,
"institutionCourtMeasures": false
},
"geographicTaxonomies": [
{
"code": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
"agentOfPublicServiceNote" : "string",
"otherNote" : "string"
},
"gpuData": {
"businessRegisterNumber": "string",
"legalRegisterName": "string",
"legalRegisterNumber": "string",
"manager": false,
"managerAuthorized": false,
"managerEligible": false,
"managerProsecution": false,
"institutionCourtMeasures": false
},
"dataProtectionOfficer": {
"address": "string",
"email": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.swagger.annotations.ApiModelProperty;
import it.pagopa.selfcare.onboarding.common.InstitutionType;
import it.pagopa.selfcare.onboarding.connector.model.onboarding.GPUData;
import lombok.Data;

import javax.validation.Valid;
Expand Down Expand Up @@ -74,4 +75,7 @@ public class OnboardingProductDto {

@ApiModelProperty(value = "${swagger.onboarding.institutions.model.aggregates}")
private List<AggregateInstitution> aggregates;

@ApiModelProperty(value = "${swagger.onboarding.institutions.model.gpuData}")
private GPUData gpuData;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public interface OnboardingResourceMapper {
@Mapping(source = "assistanceContacts.supportEmail", target = "institutionUpdate.supportEmail")
@Mapping(source = "assistanceContacts.supportPhone", target = "institutionUpdate.supportPhone")
@Mapping(source = "additionalInformations", target = "institutionUpdate.additionalInformations")
@Mapping(source = "gpuData", target = "institutionUpdate.gpuData")
@Mapping(source = "originId", target = "originId")
OnboardingData toEntity(OnboardingProductDto dto);

Expand Down
1 change: 1 addition & 0 deletions web/src/main/resources/swagger/swagger_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ swagger.onboarding.institutions.model.vatNumber=Institution's VAT number
swagger.onboarding.institutions.model.publicServices=Institution's service type
swagger.onboarding.institutions.model.pricingPlan=Product's pricing plan
swagger.onboarding.institutions.model.origin=Institution data origin
swagger.onboarding.institutions.model.gpuData=Institution's GPU data
swagger.onboarding.institutions.model.institutionType=Institution's type
swagger.onboarding.institutions.model.userRole=Logged user's role
swagger.onboarding.institutions.model.pspData=Payment Service Provider (PSP) specific data
Expand Down

0 comments on commit 97da222

Please sign in to comment.