From d5b71b4c75d663420c6e82f86cbb2e4bb65fb58c Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 26 Jan 2023 10:52:28 -0800 Subject: [PATCH 1/4] 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 6440885a8..0062ac971 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.0b6 +5.0.0 diff --git a/stripe/version.py b/stripe/version.py index fd8db5029..eb5be06b6 100644 --- a/stripe/version.py +++ b/stripe/version.py @@ -1 +1 @@ -VERSION = "5.1.0b6" +VERSION = "5.0.0" From 530a2789ebe7f9e49a2e0a4d27999e75a6e45d96 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 26 Jan 2023 10:52:28 -0800 Subject: [PATCH 2/4] Include latest changes from the master branch --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2869ec597..371cf216d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 5.1.0b6 - 2023-01-19 * [#915](https://github.com/stripe/stripe-python/pull/915) API Updates for beta branch * Updated stable APIs to the latest version - * Add support for `Tax.Settings` resource. + * Add support for `Tax.Settings` resource. ## 5.1.0b5 - 2023-01-12 * [#914](https://github.com/stripe/stripe-python/pull/914) API Updates for beta branch From 563530cec07cb3acd44426bd9fabea585c5ea783 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 26 Jan 2023 10:52:28 -0800 Subject: [PATCH 3/4] Reset version to 5.1.0b6 --- VERSION | 2 +- stripe/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 0062ac971..6440885a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.0 +5.1.0b6 diff --git a/stripe/version.py b/stripe/version.py index eb5be06b6..fd8db5029 100644 --- a/stripe/version.py +++ b/stripe/version.py @@ -1 +1 @@ -VERSION = "5.0.0" +VERSION = "5.1.0b6" From c8a99f0c4ac4fdf8c6bf782c57e1ba50caede26b Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 26 Jan 2023 10:52:45 -0800 Subject: [PATCH 4/4] Codegen for openapi v221 --- OPENAPI_VERSION | 2 +- stripe/api_resources/tax/transaction.py | 45 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f3da18c95..73d5d6e51 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v219 \ No newline at end of file +v221 \ No newline at end of file diff --git a/stripe/api_resources/tax/transaction.py b/stripe/api_resources/tax/transaction.py index 4c102abfb..e21f65b18 100644 --- a/stripe/api_resources/tax/transaction.py +++ b/stripe/api_resources/tax/transaction.py @@ -2,6 +2,7 @@ # File generated from our OpenAPI spec from __future__ import absolute_import, division, print_function +from stripe import util from stripe.api_resources.abstract import CreateableAPIResource @@ -24,3 +25,47 @@ def create_reversal( stripe_account=stripe_account, params=params, ) + + @classmethod + def _cls_list_line_items( + cls, + transaction, + api_key=None, + stripe_version=None, + stripe_account=None, + **params + ): + return cls._static_request( + "get", + "/v1/tax/transactions/{transaction}/line_items".format( + transaction=util.sanitize_id(transaction) + ), + api_key=api_key, + stripe_version=stripe_version, + stripe_account=stripe_account, + params=params, + ) + + @util.class_method_variant("_cls_list_line_items") + def list_line_items(self, idempotency_key=None, **params): + return self._request( + "get", + "/v1/tax/transactions/{transaction}/line_items".format( + transaction=util.sanitize_id(self.get("id")) + ), + idempotency_key=idempotency_key, + params=params, + ) + + @classmethod + def list_transactions( + cls, api_key=None, stripe_version=None, stripe_account=None, **params + ): + return cls._static_request( + "get", + "/v1/tax/transactions", + api_key=api_key, + stripe_version=stripe_version, + stripe_account=stripe_account, + params=params, + )