EasyPost / easypost-java

EasyPost Shipping API Client Library for Java
https://easypost.com/docs/api
MIT License
54 stars 37 forks source link

[fix] Address verification details lost during deserialization #289

Closed nwithan8 closed 12 months ago

nwithan8 commented 12 months ago

Description

Our current setup reuses the Error class to represent address verification errors. However, the Error class has a custom deserializer that is being called during typical JSON deserialization in our library. Hard-coded logic inside that deserializer was effectively causing deserialization of the hints for address verification to fail.

This PR introduces another custom deserializer, specifically for the AddressVerification class that handles deserializing address verification JSON without the Error deserializer getting in the way.

Closes #288

Testing

Pull Request Type

Please select the option(s) that are relevant to this PR.