feat(identity): add PF/PJ identity fields exposed by Pluggy API 0.24#68
Open
cernadasjuan wants to merge 2 commits into
Open
feat(identity): add PF/PJ identity fields exposed by Pluggy API 0.24#68cernadasjuan wants to merge 2 commits into
cernadasjuan wants to merge 2 commits into
Conversation
Mirror the Identity additions on the API side (pluggy-api PR #1659 / @pluggyai/commons 6.39.0). All new fields are optional — existing consumers keep working unchanged. IdentityResponse gains: - socialName, sex, maritalStatus, nationality, otherDocuments, passport (PF, from the Open Finance natural-person registrations endpoint) - incorporationDate, parties, businessOtherDocuments (PJ, from the business registrations endpoint) - companiesCnpj (shared) PhoneNumber gains countryCallingCode, areaCode, extension, additionalInfo. Address gains district, ibgeTownCode, countryCode, geographicCoordinates. New supporting types: - Sex enum - MaritalStatus + MaritalStatusCode enum - Nationality + OtherNationality + NationalityDocument - OtherDocument + OtherDocumentType enum - Passport - BusinessParty + BusinessPartyType / PersonType / DocumentType enums - BusinessOtherDocument - GeographicCoordinates Each enum follows the project's existing pattern (Gson @SerializedName + Lombok @AllArgsConstructor / @Getter); each value class uses @DaTa + @builder for consistency with Address, IdentityResponse, etc. Note: the Java SDK has historically not exposed `qualifications` or `financialRelationships`, so the new sub-fields under those (economicActivities, informedRevenue, portabilitiesReceived, etc.) are out of scope for this change and can land in a follow-up that introduces the missing parent types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.8.5 is already tagged. The release workflow reads project.version from pom.xml and skips when the corresponding tag exists, so a bump is required for this PR's additions to ship. Minor bump (1.8.5 → 1.9.0): the PR adds new optional fields and new public classes/enums but doesn't change any existing field's semantics, so the change is strictly additive / backward-compatible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors the Identity additions on the API side (pluggy-api PR #1659 /
@pluggyai/commons6.39.0) into the Java SDK. All new fields are optional / nullable — existing consumers keep working unchanged, and Gson tolerates them being absent on the wire.Companion to:
pluggy-node#…— TypeScript SDK legpluggy-api#1659— server-side leg, already mergedpluggy-connectors#3655— iniciador connector populates the new fieldsWhat changes
Extended classes
IdentityResponsegains 10 optional fields:socialName,sex,maritalStatus,nationality,otherDocuments,passportincorporationDate,parties,businessOtherDocumentscompaniesCnpjPhoneNumbergainscountryCallingCode,areaCode,extension,additionalInfo.Addressgainsdistrict,ibgeTownCode,countryCode,geographicCoordinates.New types (15)
Sex(enum)MaritalStatus+MaritalStatusCodeenumNationality+OtherNationality+NationalityDocumentOtherDocument+OtherDocumentTypeenumPassportBusinessParty+BusinessPartyType/BusinessPartyPersonType/BusinessPartyDocumentTypeenumsBusinessOtherDocumentGeographicCoordinatesEvery enum follows the existing project pattern (Gson
@SerializedName+ Lombok@AllArgsConstructor/@Getter); every value class uses@Data+@Builderfor consistency withAddress,IdentityResponse, etc.Out of scope
The Java SDK has historically not exposed
qualificationsorfinancialRelationships, so the new sub-fields that live under those (economicActivities,informedRevenue,portabilitiesReceived,paychecksBankLink,informedPatrimony.date, procurator'sdocumentNumber/documentType, etc.) are not in this PR. They need the missing parent types introduced first — better as a follow-up that also catches the Java SDK up on the pre-existing fields.Test plan
mvn compile— clean.mvn test-compile— clean.mvn test— unit tests (ai.pluggy.client.unit.*) pass. Integration tests fail atBaseApiIntegrationTest.checkEnvErrorsbecause they require real API credentials in env vars — pre-existing, unrelated to this PR.🤖 Generated with Claude Code