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

Make parent on OrderItem expandable #1516

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

remi-stripe
Copy link
Contributor

Make parent on OrderItem expandable. This helps fix part of #1515

This is a tricky one though. First because it's a breaking change as we original chose Parent and not ParentId as the name. Second, because parent 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 is HasId.

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

@ob-stripe
Copy link
Contributor

That's fine, parent can only be a Sku. (Initially it could be either a Sku or a Discount, but that never worked properly because discounts don't have IDs, which is a prerequisite for expansion. This was fixed a few months back.)

@remi-stripe
Copy link
Contributor Author

@ob-stripe Can you make that part of your next major release? Avoids a major version just for this.

@ob-stripe ob-stripe changed the base branch from master to integration-v23 February 14, 2019 16:50
@ob-stripe ob-stripe changed the base branch from integration-v23 to master February 14, 2019 16:50
@ob-stripe ob-stripe changed the base branch from master to integration-v23 February 14, 2019 17:17
@ob-stripe ob-stripe force-pushed the remi-orderitem-parent-expandable branch from ce817cd to 7b921f1 Compare February 14, 2019 17:20
@ob-stripe ob-stripe merged commit 4e3a5f5 into integration-v23 Feb 14, 2019
@ob-stripe ob-stripe deleted the remi-orderitem-parent-expandable branch February 14, 2019 17:20
@ob-stripe ob-stripe mentioned this pull request Feb 14, 2019
52 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants