-
Notifications
You must be signed in to change notification settings - Fork 114
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
[FEAT]: Add the plan
property in list subscriptions endpoint results
#3299
Comments
Hello @Thibault2ss As a work-around for your use-case, maybe we could add |
Yes I guess it would solve my use case. Although I'm wondering if it's the ideal approach from a design perspective ? Because at some point someone may need another info from the plan in this endpoint. And at this point, this would just be flattening every plan attributes in What you mean by performance issues, it that it's gonna add additional joins to the Postgres query, or are you thinking of something else ? For the query, if the right indexes are in place, I'm not sure adding those additional joins would be too much of a hit on the query perf ? (would need to be tested though, I've only briefly looked at the DB schema) If you're thinking about adding only those I could be totally missing the mark here, I'm not familiar with the stack yet :) |
Is your feature request related to a problem? Please describe.
The
Subscription
entity returned from the "List Subscription" endpoint doesn't include theplan
property (defining the plan overrides, if any is defined for this subscription). The only way to get that is to call the "Get Subscription" endpoint, which result does include thisplan
property.As a developer, when listing all the subscriptions of a customer, that forces me to do a "List" followed by one or many "Get" (as many as there are subscriptions) in order to get the subscription details along with the potential plan overrides.
The goal is to display the actual price(s) of the subscription(s) that a given customer has (which is potentially custom and "overridden")
Not urgent, but just better dev XP
Describe the solution you'd like
Include the
plan
property in the results of "List Subscriptions" endpoint, as currently done in "Get Subscription".Describe alternatives you've considered
As an alternative, we can call "List Subscriptions" followed by multiple "Get Subscription" requests, for each individual subscription.
Additional context
The text was updated successfully, but these errors were encountered: