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
This release introduces
StripeClient
and a service-based call pattern. This new interface allows you to easily call Stripe APIs and has several benefits over the existing resource-based pattern:For full migration instructions, please refer to the v8 migration guide.
"⚠️ " symbol highlights breaking changes
api_key
,stripe_account
,stripe_version
, andidempotency_key
can no longer be passed in positionally on resource methods. Please pass these in as keyword arguments.BEFORE
AFTER
Quote.pdf
) now returns a single value of typeStripeResponseStream
instead of a tuple containing(StripeResponseStream, api_key)
.APIRequestor
.APIRequestor
's main use is internal, and we don't have a good understanding of its external use cases. We had to make several breaking changes to its interface as part of this update, so rather than leaving it public we made it private. If you have a use case forAPIRequestor
, please open up a Github issue describing it. We'd rather you rely on something specifically designed for your use case than having to reach into the library's internals.api_version
fromFile.create
parameters. Please usestripe_version
instead.util.read_special_variable()
utility method (importing directly fromstripe.util
is deprecated as of v7.8.0)StripeError.construct_error_object()
. This method was intended for internal stripe-python use only.ListObject.empty_list()
. This method was intended for internal stripe-python use only.SearchResultObject.empty_search_result()
. This method was intended for internal stripe-python use only.StripeObject.ReprJSONEncoder
. This class was intended for internal stripe-python use only.StripeObject.api_base
. This property was defunct and returnedNone
.