EasyPost / easypost-java

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

add missing object field to all models #297

Closed jchen293 closed 9 months ago

jchen293 commented 9 months ago

Description

Add the missing object field to all models. Previously, some models had the object field while most models did not, moving the object field to EasyPostSource.java so every model has this field

Testing

Re-record a dozen cassettes, add an assertion to one unit test

Pull Request Type

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

jchen293 commented 9 months ago

My only concern is does this no pop up on object that do NOT have an object and we essentially flipped the problem?

If a user tries to get the object field when the endpoint does not have it, then it returns a null. The concept here is the same as having id, created_at, and updated_at fields in EasyPostSource.java for all models as almost all of our endpoints return an object field as part of the response, if a model doesn't have an object field, we can explicitly define the fields for that model class and not inherit to the EasyPostSource.java