From 5edeff826466c76cacb513dc405fc70d04ca47a4 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 5 Jan 2023 11:44:13 -0800 Subject: [PATCH 1/3] Set version to 5.0.0 to simplify merge --- VERSION | 2 +- stripe/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index e756ed1ed..0062ac971 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.0b3 +5.0.0 diff --git a/stripe/version.py b/stripe/version.py index 1b84294f3..eb5be06b6 100644 --- a/stripe/version.py +++ b/stripe/version.py @@ -1 +1 @@ -VERSION = "5.1.0b3" +VERSION = "5.0.0" From 5b64980acdbbf7d01b689aa7df0ffea7a270c2a4 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 5 Jan 2023 11:44:13 -0800 Subject: [PATCH 2/3] Reset version to 5.1.0b3 --- VERSION | 2 +- stripe/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 0062ac971..e756ed1ed 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.0 +5.1.0b3 diff --git a/stripe/version.py b/stripe/version.py index eb5be06b6..1b84294f3 100644 --- a/stripe/version.py +++ b/stripe/version.py @@ -1 +1 @@ -VERSION = "5.0.0" +VERSION = "5.1.0b3" From 4e80150babce30acd8fe9b73392ad9a273097671 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 5 Jan 2023 11:44:29 -0800 Subject: [PATCH 3/3] Codegen for openapi v217 --- OPENAPI_VERSION | 2 +- stripe/api_resources/account.py | 8 ++++---- stripe/api_resources/customer.py | 8 ++++---- stripe/api_resources/quote.py | 31 +++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a75e729f5..b87b42e0c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v216 \ No newline at end of file +v217 \ No newline at end of file diff --git a/stripe/api_resources/account.py b/stripe/api_resources/account.py index 196c16484..ce23fba63 100644 --- a/stripe/api_resources/account.py +++ b/stripe/api_resources/account.py @@ -13,15 +13,15 @@ from stripe.six.moves.urllib.parse import quote_plus +@nested_resource_class_methods( + "external_account", + operations=["create", "retrieve", "update", "delete", "list"], +) @nested_resource_class_methods( "capability", operations=["retrieve", "update", "list"], resource_plural="capabilities", ) -@nested_resource_class_methods( - "external_account", - operations=["create", "retrieve", "update", "delete", "list"], -) @nested_resource_class_methods("login_link", operations=["create"]) @nested_resource_class_methods( "person", diff --git a/stripe/api_resources/customer.py b/stripe/api_resources/customer.py index 655c95688..979341c8b 100644 --- a/stripe/api_resources/customer.py +++ b/stripe/api_resources/customer.py @@ -14,6 +14,10 @@ @test_helpers +@nested_resource_class_methods( + "source", + operations=["create", "retrieve", "update", "delete", "list"], +) @nested_resource_class_methods( "balance_transaction", operations=["create", "retrieve", "update", "list"], @@ -22,10 +26,6 @@ "cash_balance_transaction", operations=["retrieve", "list"], ) -@nested_resource_class_methods( - "source", - operations=["create", "retrieve", "update", "delete", "list"], -) @nested_resource_class_methods( "tax_id", operations=["create", "retrieve", "delete", "list"], diff --git a/stripe/api_resources/quote.py b/stripe/api_resources/quote.py index c7a6d11d5..21e2fc7f0 100644 --- a/stripe/api_resources/quote.py +++ b/stripe/api_resources/quote.py @@ -228,6 +228,37 @@ def list_lines(self, idempotency_key=None, **params): params=params, ) + @classmethod + def _cls_mark_stale_quote( + cls, + quote, + api_key=None, + stripe_version=None, + stripe_account=None, + **params + ): + return cls._static_request( + "post", + "/v1/quotes/{quote}/mark_stale".format( + quote=util.sanitize_id(quote) + ), + api_key=api_key, + stripe_version=stripe_version, + stripe_account=stripe_account, + params=params, + ) + + @util.class_method_variant("_cls_mark_stale_quote") + def mark_stale_quote(self, idempotency_key=None, **params): + return self._request( + "post", + "/v1/quotes/{quote}/mark_stale".format( + quote=util.sanitize_id(self.get("id")) + ), + idempotency_key=idempotency_key, + params=params, + ) + @classmethod def _cls_preview_invoice_lines( cls,