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 specific classes for nested objects (instead of StripeObject) #1740

Open
momala454 opened this issue Aug 23, 2024 · 1 comment
Open

Add specific classes for nested objects (instead of StripeObject) #1740

momala454 opened this issue Aug 23, 2024 · 1 comment

Comments

@momala454
Copy link

momala454 commented Aug 23, 2024

Describe the bug

This is what the spec says for Price->recurring

* @property null|\Stripe\StripeObject $recurring The recurring components of a price such as <code>interval</code> and <code>usage_type</code>.

So the IDE have no idea what's inside

According to the doc, we know what's inside https://docs.stripe.com/api/prices/object
image

To Reproduce

Just lookup doc

Expected behavior

Complete doc

Code snippets

No response

OS

windows

PHP version

8.3

Library version

v15.7.0

API version

2024-06-20

Additional context

No response

@momala454 momala454 added the bug label Aug 23, 2024
@richardm-stripe
Copy link
Contributor

Hello @momala454, thanks for writing in!

The Openapi spec actually does have a definition for Price.recurring, and we have full types for this in other libraries but the problem our generator for stripe-php only generate classes for top-level resources and doesn't generate classes yet for the nested data structures inside.

This is definitely on our radar and an improvement we plan to make to the library, but I am reclassifying as a feature request and editing the issue name! We'll keep you posted.

@richardm-stripe richardm-stripe changed the title Incomplete OpenAPI spec for price (maybe others ?) Add specific classes for nested objects (instead of StripeObject) Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants