-
Notifications
You must be signed in to change notification settings - Fork 387
Remove RequestOptions.setStripeVersionOverride
#1464
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
Remove RequestOptions.setStripeVersionOverride
#1464
Conversation
e5083f8 to
cde1e79
Compare
|
Assigned you @pakrym-stripe as you are the "reporter" on our internal ticket for this ;) |
| * @return option builder | ||
| */ | ||
| public RequestOptionsBuilder setStripeVersionOverride(String stripeVersionOverride) { | ||
| public RequestOptionsBuilder _setStripeVersionOverride(String stripeVersionOverride) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this a static method so it doesn't show up in IDE code completion. And maybe name it unsafeSetStripeVersionOverride?
pakrym-stripe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Wonder if we can hide _setStripeVersionOverride in a way that doesn't pollute code completion.
pakrym-stripe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, let's hide the getVersionOverride
Co-authored-by: pakrym-stripe <[email protected]>
RequestOptions.setStripeVersionOverride
Notify
cc @stripe/api-library-reviewers
Summary
This PR removes
RequestOptions.setStripeVersionOverride. There was only one supported use case forsetStripeVersionOverride, forEphemeralKey.create. Now, users shouldto set the
Stripe-Versionheader appropriately.We introduce
RequestOptions.unsafeSetStripeVersionOverridewhich is marked as internal only.Because
com.stripe.model.EphemeralKeyis not in thecom.stripe.netpackage, we can't actually change make this internal-only method private, but users should not use it.Changelog
StripeVersionas a required value onEphemeralKeyCreateParams.EphemeralKey.createwithout specifyingRequestOptions.RequestOptions.setStripeVersionOverrideis renamed tounsafeStripeVersionOverrideto confront upgrading users with the fact that this is now internal-only and should not be used. The docs now indicate it is internal-only. It is also now a static method, to prevent it from polluting IDE autocomplete list.RequestOptions.getStripeVersionOverrideis similarly changed tounsafeGetStripeVersionOverride.RequestOptions.clearStripeVersionOverrideis removed entirely. There is no reason to use this.RequestOptions.toBuilderis now marked as deprecated, in favor oftoBuilderFullCopy, which has clearer semantics.