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

apiVersion can only be set to the latest api version? Can this be set to be latestVersion or string? #92

Closed
ntegral opened this issue Apr 6, 2020 · 4 comments
Labels
question Further information is requested

Comments

@ntegral
Copy link

ntegral commented Apr 6, 2020

apiVersion can only be set to the latest api version? Can this be set to be latestVersion or string?

@dhaspden
Copy link
Owner

dhaspden commented Apr 7, 2020

@ntegral thanks for opening the issue. I have just released 0.4.0. Does this solve your needs? As far as I know you can provide your own version string.

@dhaspden dhaspden added the question Further information is requested label Apr 7, 2020
@ntegral
Copy link
Author

ntegral commented Apr 7, 2020

The short answer is no. Your StripeOptions extends the Stripe.StripeConfig interface and the apiVersion only accepts a type of LatestVersion which is set to "2020-03-02"; In order to use a different apiVersion the underlying library requires that I use @ts-ignore statement to use a different version. So technically, it's not the code that you've written... it's the underlying dependency code.

@dhaspden
Copy link
Owner

dhaspden commented Apr 7, 2020

I see. I briefly looked into it and saw this. From what I see they don't plan on supporting any version except the latest version? I'd imagine the only way to get around that would be to use the Stripe node version which uses the API version that you want to use?

My library lets you bring your own Stripe version at least... hopefully that helps a little bit. As long as you use ^8.0.0 you're good.

I do understand their reasoning though: kind of hard to maintain definitions for all of their API versions. Not ideal though.

@dhaspden
Copy link
Owner

Going to close this for now. Sorry I can't be of any more help! If they ever support this option we can revisit.

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

No branches or pull requests

2 participants