Skip to content

feat(identity): add PF/PJ identity fields exposed by Pluggy API 0.24#68

Open
cernadasjuan wants to merge 2 commits into
masterfrom
feat/identity-pf-pj-fields
Open

feat(identity): add PF/PJ identity fields exposed by Pluggy API 0.24#68
cernadasjuan wants to merge 2 commits into
masterfrom
feat/identity-pf-pj-fields

Conversation

@cernadasjuan
Copy link
Copy Markdown
Contributor

Summary

Mirrors the Identity additions on the API side (pluggy-api PR #1659 / @pluggyai/commons 6.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 leg
  • pluggy-api#1659 — server-side leg, already merged
  • pluggy-connectors#3655 — iniciador connector populates the new fields

What changes

Extended classes

IdentityResponse gains 10 optional fields:

  • PF — socialName, sex, maritalStatus, nationality, otherDocuments, passport
  • PJ — incorporationDate, parties, businessOtherDocuments
  • Shared — companiesCnpj

PhoneNumber gains countryCallingCode, areaCode, extension, additionalInfo.

Address gains district, ibgeTownCode, countryCode, geographicCoordinates.

New types (15)

  • Sex (enum)
  • MaritalStatus + MaritalStatusCode enum
  • Nationality + OtherNationality + NationalityDocument
  • OtherDocument + OtherDocumentType enum
  • Passport
  • BusinessParty + BusinessPartyType / BusinessPartyPersonType / BusinessPartyDocumentType enums
  • BusinessOtherDocument
  • GeographicCoordinates

Every enum follows the existing project pattern (Gson @SerializedName + Lombok @AllArgsConstructor / @Getter); every value class uses @Data + @Builder for consistency with Address, IdentityResponse, etc.

Out of scope

The Java SDK has historically not exposed qualifications or financialRelationships, so the new sub-fields that live under those (economicActivities, informedRevenue, portabilitiesReceived, paychecksBankLink, informedPatrimony.date, procurator's documentNumber/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 at BaseApiIntegrationTest.checkEnvErrors because they require real API credentials in env vars — pre-existing, unrelated to this PR.
  • Smoke test against a deployed API 0.24 item that returns the new fields.

🤖 Generated with Claude Code

cernadasjuan and others added 2 commits May 21, 2026 15:45
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>
Copy link
Copy Markdown
Contributor

@jhonatan-pluggy jhonatan-pluggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants