#bit_unexpected

1 messages · Page 1 of 1 (latest)

ocean valleyBOT
#

đź‘‹ 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.

silk blade
#

You are probably missing an expand

plain glen
#

humm but this is in the Charge source...

#

(it's Stripe.Charge)

ocean valleyBOT
plain glen
#

didn't knew Expanding responses, interesting... anyway it doesn't change the fact

fiery flame
#

Doesn't change what fact?

plain glen
#

that you're using the name of an object to return the string id of the object?

fiery flame
#

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

plain glen
#

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?

fiery flame
fiery flame
#

That is how it's designed

plain glen
#

Consistency for example with this

fiery flame
#

Well that's not an API property, it's just a helper class in the SDK

#

Sounds like you want the same on the Charge class, so you should just open an issue on the GH repo