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

default_currency is optional on the Account object type #2020

Closed
QuentinLemCode opened this issue Feb 13, 2024 · 2 comments
Closed

default_currency is optional on the Account object type #2020

QuentinLemCode opened this issue Feb 13, 2024 · 2 comments
Assignees
Labels

Comments

@QuentinLemCode
Copy link
Contributor

QuentinLemCode commented Feb 13, 2024

Describe the bug

Hello,
On the Account object, the type of default_currency is optional
https://github.com/stripe/stripe-node/blob/master/types/Accounts.d.ts#L59

However, the documentation says that it must be a currency
https://stripe.com/docs/api/accounts/object#account_object-default_currency

This has been introduced by this PR : #1493

Can you take a look and check why it is optional and either :

  • update the doc
  • remove the optional

Thanks !

To Reproduce

const account: Stripe.Account = retrieveAccount();
const default_currency: string = account.default_currency;
// error : account.default_currency can be undefined

Expected behavior

default_currency must not be optional

Code snippets

No response

OS

whatever

Node version

whatever

Library version

v10 and later

API version

2022-08-01

Additional context

No response

@QuentinLemCode
Copy link
Contributor Author

Stripe support said me that they were able to create an account without default_currency set.
image

Can you update the doc then please ?

Thanks

@remi-stripe remi-stripe self-assigned this Feb 13, 2024
@remi-stripe
Copy link
Contributor

@QuentinLemCode Github issues are limited to bugs or feature requests with the stripe-node SDK itself. Your ask seems to be about our public docs which is better directed at our support team for help instead: https://support.stripe.com/contact

Just to unblock you, I don't think we'll change the docs for now. What you're asking is to document whether a property can be null or optional (not returned at all). But this is not something our API Reference supports just yet unfortunately. We do hope to add this in the future but have no timeline for that just yet unfortunately. Reporting it to our support team is the best way to flag your interest for this improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants