Mangopay / mangopay2-java-sdk

Java SDK for MANGOPAY
https://search.maven.org/artifact/com.mangopay/mangopay2-java-sdk
MIT License
25 stars 29 forks source link

Optional LegalRepresentativeBirthday with primitive long #241

Closed LeComptoirDesPharmacies closed 3 years ago

LeComptoirDesPharmacies commented 3 years ago

Bug with primitive long

Hi, we have an issue on update legal user endpoint. The properties LegalRepresentativeBirthday is optional but when it's not fill, it's set automatically to 0 as it is a primitive long.

The bug

So when we have an user who already have a LegalRepresentativeBirthday set at the creation of the user for exemple and then we update the user with LegalRepresentativeBirthday unset, the initial value will be replace by 0. And it will invalidate every KYC documents.

The solution

Replace the primitive long ( unboxing ) by and a Long object ( autoboxing ) and then when it's not fill, it will be set to null and do not change the initial value.

fredericdelordm commented 3 years ago

Hello @LeComptoirDesPharmacies,

First of all, great catch and thank you for your feedback. Our team is looking into it. I will keep you updated.

Have a nice day,

fredericdelordm commented 3 years ago

Hello @LeComptoirDesPharmacies,

This has been fixed in our latest release : 2.14.0.

Have a nice day,