EasyPost / easypost-java

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

[fix] ID field usage in string representation of EasyPost objects #311

Closed nwithan8 closed 5 months ago

nwithan8 commented 5 months ago

Description

Previous method of reflection to retrieve the id of an EasyPostResource often failed, resulting in fallback to empty string. As a result, the string representation of any EasyPostResource was often an empty string.

New method improves toString calculation, including accounting for present/non-present id field (ephemeral objects).

Testing

Pull Request Type

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

jchen293 commented 5 months ago

I know the code is very old, but is it possible to have a unit test for this change?