Skip to content
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

API Updates for beta branch #917

Merged
merged 4 commits into from Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v219
v221
45 changes: 45 additions & 0 deletions stripe/api_resources/tax/transaction.py
Expand Up @@ -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


Expand All @@ -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,
)