-
Notifications
You must be signed in to change notification settings - Fork 850
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
ach_credit_transfer property #603
Conversation
Perhaps we could do something like this:
@remi-stripe ? :) I've seen a bit of confusion in the IRC channel regarding this particular object structure, so perhaps PHPDocs could help make this clearer. |
@nickdnk I think it's fine to leave as it. There are a lot of properties/hashes that are not always set/present. I'm not sure what the alternative gives us since in the IDE it would still show each one separately right? I'm fine adding each one if you're up for it, but without the ones that are not public yet:
Also the thee_d_secure one is not an instance of |
I only added the explanation for clarity, since it's atypical for your objects to have a property that defines another existing property directly. How is a I'm well aware that the auto-complete in IDEs will always show all properties, but I think that's better than them saying "this property does not exist" because all of them are missing by design as of now. Edit: To clarify, we already do this with the |
Sure but that would not be visible to any dev that doesn't go and read the header of the class right?
It does, but you're misunderstanding how this resource works. Cards are the historical object and look like this:
The
The nested
You were worried that adding |
Of course, but I think it makes sense to make this slightly odd logic available in as many places as possible to make it easier on devs.
Cool.
I was only worried about adding I'll add all of them as mixed and update my PR: Shall I include them at the bottom after the proposed explanation, or do you want them alphabetically mixed with all the others? |
I would recommend keeping it alphabetized for now, I think it's cleaner and we can just update this if we hear feedback from devs that it's confusing. There's a world in the future where stripe-php will be auto-generated and we can easily add comments for all the properties! |
Ok!
And here I was hoping for a job as the official phpdoc maintainer 😄 |
That should do it. |
Don't worry that future is far away I thiiiiiink. Also you can always start helping us maintain stripe-go and stripe-dotnet :p |
Thanks for all the hardwork as usual @nickdnk! Released as 6.30.3 |
You're welcome. I struggled a bit with trying to get the proper exceptions included in phpdocs for all objects, but it seems to be an impossible feat because of the way the library is built with traits. I have a lot of silenced Exception warnings because of this, unfortunately. As you can imagine I use phpdocs extensively in my project. |
Hello
On my pull request from yesterday I noticed I had erroneously included the
ach_credit_transfer
property on theSource
class as it was the example used in the docs, however, this particular property is dynamic and only present if thetype
of the object isach_credit_transfer
.If we are to include
ach_credit_transfer
, we should include all the possible enumerations oftype
. I can do that as well. What do you think?I apologise for overlooking this.
https://stripe.com/docs/api/sources/object