#bit_unexpected
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1380106834701975642
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Doesn't change what fact?
that you're using the name of an object to return the string id of the object?
Yes, it's an expandable property. If you want to full object then you need to expand in your request as my colleague linked
By default it just returns the pm_xxx ID
Guys, I think my point got lost in the expand/object discussion.
I’m not talking about the ability to expand objects (that’s clear, and thanks for the tip).
What I mean is about naming conventions:
Everywhere else in the Stripe API, you use PaymentMethod to return the full object, and PaymentMethodId (or similar) to return just the ID string.
But in the Charge object, the PaymentMethod property returns only the string ID – not the object itself. This is inconsistent with the rest of the API, where PaymentMethod is the actual object.
That’s the confusing part.
Shouldn’t it be called PaymentMethodId on Charge too, for consistency?
This is inconsistent with the rest of the API, where PaymentMethod is the actual object.
I don't think that's true? Another example wherePaymentMethodis a string:
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Consistency with what?
That is how it's designed
Consistency for example with this
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - stripe/stripe-dotnet