Skip to content

Commit

Permalink
[SELC-4988] feat: Add new api to call national-registries for verifyi…
Browse files Browse the repository at this point in the history
…ng Legals for pnpg (#246)
  • Loading branch information
KevinSi96 authored May 31, 2024
1 parent e410f1d commit fba4657
Show file tree
Hide file tree
Showing 24 changed files with 2,569 additions and 34 deletions.
93 changes: 93 additions & 0 deletions app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
}, {
"name" : "institutions-pnpg",
"description" : "Pn Pg Controller"
}, {
"name" : "national-registries",
"description" : "National Registry Controller"
}, {
"name" : "onboarding",
"description" : "Onboarding operations"
Expand Down Expand Up @@ -589,6 +592,68 @@
} ]
}
},
"/v2/national-registries/legal-tax/verification" : {
"post" : {
"tags" : [ "external-v2", "national-registries" ],
"summary" : "verifyLegal",
"description" : "Verify if given taxId is legal of given institution identified with vatNumber",
"operationId" : "verifyLegalByPOST",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/VerifyRequestDto"
}
}
}
},
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/LegalVerificationResource"
}
}
}
},
"400" : {
"description" : "Bad Request",
"content" : {
"application/problem+json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
}
},
"401" : {
"description" : "Unauthorized",
"content" : {
"application/problem+json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
}
},
"500" : {
"description" : "Internal Server Error",
"content" : {
"application/problem+json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
}
}
},
"security" : [ {
"bearerAuth" : [ "global" ]
} ]
}
},
"/v2/onboarding" : {
"post" : {
"tags" : [ "onboarding" ],
Expand Down Expand Up @@ -1862,6 +1927,21 @@
}
}
},
"LegalVerificationResource" : {
"title" : "LegalVerificationResource",
"type" : "object",
"properties" : {
"resultCode" : {
"type" : "string"
},
"resultDetail" : {
"type" : "string"
},
"verificationResult" : {
"type" : "boolean"
}
}
},
"LegalsResource" : {
"title" : "LegalsResource",
"type" : "object",
Expand Down Expand Up @@ -2615,6 +2695,19 @@
"description" : "User's surname"
}
}
},
"VerifyRequestDto" : {
"title" : "VerifyRequestDto",
"required" : [ "taxId", "vatNumber" ],
"type" : "object",
"properties" : {
"taxId" : {
"type" : "string"
},
"vatNumber" : {
"type" : "string"
}
}
}
},
"securitySchemes" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package it.pagopa.selfcare.external_api.api;

import it.pagopa.selfcare.external_api.model.institutions.InstitutionResource;
import it.pagopa.selfcare.external_api.model.nationalRegistries.LegalVerification;

public interface MsPartyRegistryProxyConnector {

InstitutionResource findInstitution(String institutionExternalId);

LegalVerification verifyLegal(String taxId, String vatNumber);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package it.pagopa.selfcare.external_api.model.nationalRegistries;

import lombok.Data;

@Data
public class LegalVerification {
private String resultCode;
private String resultDetail;
private Boolean verificationResult;
}
Loading

0 comments on commit fba4657

Please sign in to comment.