Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
StripeClient
StripeClient
and the new service-based pattern is introduced.StripeClient
has multiple benefits over existing resource-based patterns:StripeClient
is easier to mock for testing as all methods are instance methods.Migration
To migrate from resource-based to service-based pattern:
StripeClient
instance.StripeClient
calls:StripeClient
calls. Params classes will, in most cases, stay the same as you used for resource-based calls.Breaking changes
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2023-08-16.
"⚠️ " symbol highlights breaking changes.
addFullNameAliase
renamed toaddFullNameAlias
inAccountCreateParams
,AccountUpdateParams
,PersonCollectionCreateParams
,TokenCreateParams
,PersonCollectionCreateParams
,PersonUpdateParams
.addLookupKeys
renamed toaddLookupKey
inPriceListParams
RequestOptions.getReadTimeout()
,getConnectTimeout()
,getMaxNetworkRetries()
now returnInteger
instead ofint
.RequestOptions.getDefault()
does not apply global configuration options fromStripe
class, all fields are initialized tonull
.RequestOptionsBuilder
does not apply global configuration options fromStripe
class, all fields are initialized tonull
.StripeResponseGetter.oauthRequest(...)
was removed. OAuth requests are now performed viaStripeResponseGetter.request
withApiMode.OAuth
.StripeResponseGetter.request(...)
,streamRequest(...)
signatures changed.BaseAddress
parameter added.url
renamed topath
and is a relative to the base addressapiMode
parameter added to control how request is sent and response is handled,V1
andOAuth
are supported values.ApiResource.className()
singleClassUrl()
,classUrl()
,instanceUrl()
,subresourceUrl()
methods removed.ApiResource.request()
,requestStream()
,requestCollection()
,requestSearchResult()
methods removed.