Skip to content

Commit 2a38be2

Browse files
authored
feat(investment): add issueDate, purchaseDate, issuerCNPJ fields (#82)
The Pluggy API returns three Investment fields the DTO does not map. Under Gson's FieldNamingPolicy.IDENTITY, Java field names must match the API JSON keys byte-for-byte, so unmapped/misnamed fields are silently dropped to null. - issueDate: the existing `issuerDate` field is a misnaming (extra `r`) with no matching API key, so it was always null. Added the correct `issueDate` and marked `issuerDate` @deprecated (kept for backward compatibility). - purchaseDate: was not mapped. - issuerCNPJ: was not mapped (casing verified against api.pluggy.ai/oas3.json, CNPJ is upper-case in the spec). issueDate/purchaseDate are date-time strings -> Date, matching the existing `date`/`dueDate` mapping; issuerCNPJ is a string.
1 parent 3e0295f commit 2a38be2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/java/ai/pluggy/client/response/Investment.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ public class Investment {
3636
String amountProfit = null;
3737
Double amountWithdrawal;
3838
String issuer;
39+
String issuerCNPJ;
40+
/**
41+
* @deprecated the API field is {@code issueDate}; this misnamed field always
42+
* resolves to {@code null} under Gson's {@code IDENTITY} naming.
43+
* Use {@link #issueDate} instead.
44+
*/
45+
@Deprecated
3946
Date issuerDate;
47+
Date issueDate;
48+
Date purchaseDate;
4049
InvestmentStatus status;
4150
/**
4251
* @deprecated use

0 commit comments

Comments
 (0)