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

Remove caption from Product type #1518

Closed
JarrodMFlesch opened this issue Aug 22, 2022 · 4 comments · Fixed by #1534
Closed

Remove caption from Product type #1518

JarrodMFlesch opened this issue Aug 22, 2022 · 4 comments · Fixed by #1534

Comments

@JarrodMFlesch
Copy link

Is your feature request related to a problem? Please describe.

I see here that caption is a required property on Product, but I do not see it in the docs here and it does not seem to come back from the API.

So when I copy a response from a Products list response, and type it as Stripe.ApiList<Stripe.Product>, TS complains because caption is required, but is not returned.

Describe the solution you'd like

I think caption may be incorrect or a deprecated type? If it is deprecated - should the type be optional?

Describe alternatives you've considered

I did a search on open/closed issues for regarding caption but could not find anything.

Additional context

No response

@dcr-stripe
Copy link
Contributor

Thanks for the report @JarrodMFlesch and sorry you're experiencing issues!

The type should indeed be optional, since it's only included for products with type set to good. The team will look into a fix and get back to you as soon as possible!

@dcr-stripe
Copy link
Contributor

This is actually a broader issue, where a number of types that are both nullable and optional should be marked as such. As an example, Product.unit_label is also in this category.

@dcr-stripe
Copy link
Contributor

Thanks for the report again @JarrodMFlesch - this has been fixed in v10.6.0.

@JarrodMFlesch
Copy link
Author

Thank you @dcr-stripe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants