-
Notifications
You must be signed in to change notification settings - Fork 368
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
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
?
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.
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 <99349468+pakrym-stripe@users.noreply.github.com>
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-Version
header appropriately.We introduce
RequestOptions.unsafeSetStripeVersionOverride
which is marked as internal only.Because
com.stripe.model.EphemeralKey
is not in thecom.stripe.net
package, we can't actually change make this internal-only method private, but users should not use it.Changelog
StripeVersion
as a required value onEphemeralKeyCreateParams
.EphemeralKey.create
without specifyingRequestOptions
.RequestOptions.setStripeVersionOverride
is renamed tounsafeStripeVersionOverride
to 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.getStripeVersionOverride
is similarly changed tounsafeGetStripeVersionOverride
.RequestOptions.clearStripeVersionOverride
is removed entirely. There is no reason to use this.RequestOptions.toBuilder
is now marked as deprecated, in favor oftoBuilderFullCopy
, which has clearer semantics.