Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing object field to all models #297

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

jchen293
Copy link
Contributor

@jchen293 jchen293 commented Dec 7, 2023

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@jchen293 jchen293 requested a review from a team December 7, 2023 19:13
Copy link
Member

@Justintime50 Justintime50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jchen293
Copy link
Contributor Author

jchen293 commented Dec 7, 2023

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

Copy link
Member

@Justintime50 Justintime50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we have seems reasonable

@jchen293 jchen293 merged commit a53aacc into master Dec 7, 2023
17 checks passed
@jchen293 jchen293 deleted the add_object_field branch December 7, 2023 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants