-
Notifications
You must be signed in to change notification settings - Fork 848
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
Added more constants, fixed more docs, added missing objects #481
Conversation
Hey Nick. Awesome work as usual.
So, yes, you do need to add those new objects to the Util map so the deserializer knows about them. If you don't add them, then the objects will be deserialized to default This also means that you should remove the Also, you're correct that your new classes should not extend Overall though, I have some concerns about adding those new classes purely for the sake of describing the attributes with phpdoc. @brandur-stripe wdyt?
No, I think
Topups are a private beta feature. The link is valid, but you need to be logged into an account that has been invited into the beta to be able to view it.
No,
At this time, your best bet is to look at the diffs in the OpenAPI spec: https://github.com/stripe/openapi. Ultimately we'll be able to autogenerate the phpdocs directly from the spec, but we're not quite there yet. |
Hey I removed the I added those classes to I'll rebase to one commit once we've agreed on everything. |
Does this mean that all variables currently defined as |
I've just added the |
Added the |
Thanks for keeping this one alive and updated @nickdnk! If you get a chance, could you squash your commits? Otherwise we'll do it for you when we bring it in (and the commit message might not be as good).
Sorry @ob-stripe, I totally missed this @ to me last time. I guess I could see it either way, but IMO since these are considered first class API objects (i.e. they have their own sections in the API reference), it's okay to have them as separate classes, so I'd +1 this as currently implemented. I'll defer to you though. I did a quick pass on the changes otherwise too, and LGTM. ptal @ob-stripe |
@brandur-stripe Squashed as requested :) |
Added charge decline code constants to Charge Added payout failure code constants to Payout Indented subscription constants like elsewhere Corrected alphabetical order of constants in Payout Updated phpdocs across the board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Released as 6.8.0. Thanks again @nickdnk :) |
Hello
Added
Discount
,DisputeEvidence
andOrderItem
objects - none of these extendApiResource
since they don't have anid
property which I assume is necessary for that. Anywhere these objects are referenced in phpdocs I've update those from the previously usedmixed
type.DisputeEvidence
isn't really a class since it doesn't have anOBJECT_NAME
. If you think it's silly I'll remove it from the PR. I only added it because it exists as a standalone documented object: https://stripe.com/docs/api#dispute_evidence_object. And: AreDiscount
andOrderItem
supposed to be in theUtil
map?Added charge decline code constants to
Charge
- following the logic elsewhere in the library. I was not sure if this should be onCard
or onCharge
, but I thinkCharge
, no? Or perhaps we should move them to the\Stripe\Error\Card
object?Added payout failure code constants to
Payout
- following the logic elsewhere in the library.Indented
Subscription
status constants like elsewhere - minor edit.Some things I noticed:
The
Topup
object is missing from the documentation, even though it links to it itself: https://stripe.com/docs/api#topup_object - it doesn't exist on the page. For this reason I can't check if the phpdocs match.The
SourceTransaction
object - what is that? Why do we have it? I can't find it anywhere in the documentation. Isn't this just a normalCharge
object used as a source for transactions? See https://stripe.com/docs/connect/charges-transfers#transfer-availabilityAnd; is there somehow we can follow changes made to the API? It doesn't seem to be documented anywhere when changes to properties take place, which makes it quite tedious to go through all of the objects again and again to keep them updated. I assume this is the reason the phpdocs were outdated in the first place.
Cheers