Make parent
on OrderItem
expandable
#1516
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make
parent
onOrderItem
expandable. This helps fix part of #1515This is a tricky one though. First because it's a breaking change as we original chose
Parent
and notParentId
as the name. Second, becauseparent
is only expandable when it refers to a SKU and not otherwise. In stripe-go this is implemented here. In stripe-java, we avoided the issue by simply assuming that the expanded object isHasId
.Here, I used
Sku
but the alternative is likely to build an Interface just for it as we do for other polymorphic properties. Wanted to get your opinion first though.r? @ob-stripe
cc @stripe/api-libraries