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

TypeScript: Updating a subscriptions default_tax_rates is incomplete #1051

Closed
Bene-Graham opened this issue Oct 23, 2020 · 2 comments
Closed
Assignees

Comments

@Bene-Graham
Copy link

Node: 14.13.1
Stripe Lib: 8.116.0

The type SubscriptionUpdateParams has a field called default_tax_rates with the following comment:

The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.

It states to pass an empty string to remove the tax rates, which the typings don't allow.

@richardm-stripe richardm-stripe self-assigned this Oct 23, 2020
@richardm-stripe
Copy link
Contributor

richardm-stripe commented Oct 23, 2020

Hi @Bene-Graham, sorry about the confusion. You ought to use null here. stripe-node converts null to empty string over the wire (null is a more idiomatic way of deleting something in Javascript, but Stripe's API uses URL encoding, which has no concept of null), and we generate the docstring from a source that describes the parameter from the API's perspective, not node's.

@Bene-Graham
Copy link
Author

@richardm-stripe Perfect, that worked. Thank you for your help.

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

No branches or pull requests

2 participants