From 2d39c3bc3ed3bcc07c1eb5516458ce63096d9984 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Fri, 5 Jun 2026 14:31:30 -0700 Subject: [PATCH 1/6] Disable trim_trailing_whitespace for CHANGELOG.md (#1822) Committed-By-Agent: claude Co-authored-by: Claude Opus 4.6 (1M context) --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 1c32a5e4c..108bfbbff 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,3 +15,6 @@ indent_size = 2 [Makefile] indent_style = tab + +[CHANGELOG.md] +trim_trailing_whitespace = false From 42db177ce3777b27135554cd09a4d59256a84d3b Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Fri, 5 Jun 2026 15:18:58 -0700 Subject: [PATCH 2/6] Add Changelog section to PR template (#1823) Committed-By-Agent: claude Co-authored-by: Claude Opus 4.6 (1M context) --- .github/pull_request_template.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 312540b61..4e1cbb2de 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g. ### See Also + +## Changelog + From a5536454ca270b0a0857c65f2cb9d0b636ce8bba Mon Sep 17 00:00:00 2001 From: David Brownman Date: Fri, 5 Jun 2026 15:45:26 -0700 Subject: [PATCH 3/6] Add source field to user-agent header (#1825) --- stripe/_api_requestor.py | 19 +++++++++++++++++++ tests/test_api_requestor.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 10bdebdcc..514c8ba82 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -1,7 +1,10 @@ from io import BytesIO, IOBase +import functools +import hashlib import json import os import platform +import socket from typing import ( Any, AsyncIterable, @@ -72,6 +75,19 @@ _default_proxy: Optional[str] = None +@functools.lru_cache(maxsize=None) +def _get_uname_hash() -> Optional[str]: + try: + parts: List[str] = list(platform.uname()) + try: + parts.append(socket.gethostname()) + except Exception: + pass + return hashlib.md5(" ".join(parts).encode()).hexdigest() + except Exception: + return None + + def _maybe_emit_stripe_notice(rheaders: Mapping[str, str]) -> None: notice = rheaders.get("Stripe-Notice") if notice: @@ -525,6 +541,9 @@ def request_headers( "lang": "python", "httplib": self._get_http_client().name, } + uname_hash = _get_uname_hash() + if uname_hash is not None: + ua["source"] = uname_hash attr_funcs: List[Tuple[str, Callable[[], str]]] = [ ("lang_version", platform.python_version), ] diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index ff3530359..326be0bb9 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -1,5 +1,6 @@ import datetime import json +import re import tempfile import uuid from collections import OrderedDict @@ -788,6 +789,36 @@ def fail(): last_call.get_raw_header("X-Stripe-Client-User-Agent") ) + def test_source_field_is_md5_hex(self, requestor, http_client_mock): + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + requestor.request("get", self.v1_path, {}, base_address="api") + + last_call = http_client_mock.get_last_call() + client_ua = json.loads( + last_call.get_raw_header("X-Stripe-Client-User-Agent") + ) + assert "source" in client_ua + assert re.fullmatch(r"[0-9a-f]{32}", client_ua["source"]) + + def test_source_field_absent_when_uname_fails( + self, requestor, mocker, http_client_mock + ): + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + mocker.patch( + "stripe._api_requestor._get_uname_hash", return_value=None + ) + requestor.request("get", self.v1_path, {}, base_address="api") + + last_call = http_client_mock.get_last_call() + client_ua = json.loads( + last_call.get_raw_header("X-Stripe-Client-User-Agent") + ) + assert "source" not in client_ua + def test_uses_given_idempotency_key(self, requestor, http_client_mock): method = "post" http_client_mock.stub_request( From 36e43ba1d8304d25eba0623367ace415224c5b30 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Mon, 8 Jun 2026 10:20:26 -0700 Subject: [PATCH 4/6] docs: clarify private preview SDK access in README (#1826) Committed-By-Agent: claude --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab1ba4ce0..11c828eb6 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,7 @@ stripe.add_beta_version("feature_beta", "v3") ### Private Preview SDKs -Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions. +Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions. Note that access to specific private preview API features may require separate approval. ### Custom requests From 9c209a3a60ff81d8267489b47652079ff5813e88 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 18:12:52 +0000 Subject: [PATCH 5/6] Update generated code for v2290 and 5fab6377244519650455ed4213e07c477c0bfece --- CODEGEN_VERSION | 2 +- .../v2/commerce/product_catalog/_import_create_params.py | 2 +- .../params/v2/commerce/product_catalog/_import_list_params.py | 4 +++- stripe/v2/commerce/_product_catalog_import.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index c7a237d3f..a96b40070 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -64505e82d8e31da4bf9d8fe129ff75c1a94e359b \ No newline at end of file +5fab6377244519650455ed4213e07c477c0bfece \ No newline at end of file diff --git a/stripe/params/v2/commerce/product_catalog/_import_create_params.py b/stripe/params/v2/commerce/product_catalog/_import_create_params.py index 8549de060..a84306f92 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_create_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_create_params.py @@ -6,7 +6,7 @@ class ImportCreateParams(TypedDict): - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of catalog data to import. """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_list_params.py b/stripe/params/v2/commerce/product_catalog/_import_list_params.py index fecbc23da..5833fd5e4 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_list_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_list_params.py @@ -29,7 +29,9 @@ class ImportListParams(TypedDict): Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - feed_type: NotRequired[Literal["inventory", "pricing", "product"]] + feed_type: NotRequired[ + Literal["inventory", "pricing", "product", "promotion"] + ] """ Filter by the type of feed data being imported. """ diff --git a/stripe/v2/commerce/_product_catalog_import.py b/stripe/v2/commerce/_product_catalog_import.py index 3e48b840e..b46cec31d 100644 --- a/stripe/v2/commerce/_product_catalog_import.py +++ b/stripe/v2/commerce/_product_catalog_import.py @@ -167,7 +167,7 @@ class Sample(StripeObject): """ The time this ProductCatalogImport was created. """ - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of feed data being imported into the product catalog. """ From 565ddc32af771e99919d07f231fa6a7ff0eec3e8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 22:23:06 +0000 Subject: [PATCH 6/6] Update generated code for v2291 and 1d5fb9dc5cd047376b47f4bbb9af90300932ea60 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/__init__.py | 16 + stripe/_api_version.py | 2 +- stripe/_charge.py | 16 + stripe/_confirmation_token.py | 8 + stripe/_gift_card.py | 663 ++++++++++++++++++ stripe/_gift_card_operation.py | 316 +++++++++ stripe/_gift_card_operation_service.py | 55 ++ stripe/_gift_card_service.py | 326 +++++++++ stripe/_object_classes.py | 6 + stripe/_payment_attempt_record.py | 47 +- stripe/_payment_intent.py | 216 +++++- stripe/_payment_intent_service.py | 47 ++ stripe/_payment_method.py | 8 + stripe/_payment_record.py | 47 +- stripe/_setup_intent.py | 4 + stripe/_stripe_client.py | 36 + stripe/_tax_fund.py | 188 +++++ stripe/_tax_fund_service.py | 97 +++ stripe/_v1_services.py | 12 + stripe/checkout/_session.py | 9 + stripe/issuing/_authorization.py | 2 +- stripe/issuing/_dispute.py | 36 + stripe/issuing/_token.py | 2 +- stripe/params/__init__.py | 395 +++-------- stripe/params/_charge_capture_params.py | 194 ----- stripe/params/_charge_modify_params.py | 194 ----- stripe/params/_charge_update_params.py | 194 ----- stripe/params/_gift_card_activate_params.py | 31 + stripe/params/_gift_card_cashout_params.py | 16 + .../params/_gift_card_check_balance_params.py | 16 + stripe/params/_gift_card_create_params.py | 32 + .../_gift_card_operation_retrieve_params.py | 12 + stripe/params/_gift_card_reload_params.py | 24 + stripe/params/_gift_card_retrieve_params.py | 12 + .../_gift_card_void_operation_params.py | 20 + ...t_attempt_record_report_canceled_params.py | 4 + .../params/_payment_intent_capture_params.py | 196 ------ .../params/_payment_intent_confirm_params.py | 153 ++-- .../params/_payment_intent_create_params.py | 151 ++-- .../params/_payment_intent_modify_params.py | 151 ++-- ...ent_update_crypto_refund_address_params.py | 20 + .../params/_payment_intent_update_params.py | 151 ++-- ..._report_payment_attempt_canceled_params.py | 4 + stripe/params/_setup_intent_confirm_params.py | 2 +- stripe/params/_setup_intent_create_params.py | 2 +- stripe/params/_setup_intent_modify_params.py | 2 +- stripe/params/_setup_intent_update_params.py | 2 +- stripe/params/_tax_fund_list_params.py | 47 ++ stripe/params/_tax_fund_retrieve_params.py | 12 + stripe/params/radar/__init__.py | 15 + .../_account_evaluation_create_params.py | 54 +- .../_customer_evaluation_create_params.py | 27 +- stripe/params/tax/__init__.py | 10 + .../params/tax/_calculation_create_params.py | 42 ++ stripe/tax/_calculation_line_item.py | 39 +- stripe/tax/_transaction_line_item.py | 39 +- 58 files changed, 2993 insertions(+), 1433 deletions(-) create mode 100644 stripe/_gift_card.py create mode 100644 stripe/_gift_card_operation.py create mode 100644 stripe/_gift_card_operation_service.py create mode 100644 stripe/_gift_card_service.py create mode 100644 stripe/_tax_fund.py create mode 100644 stripe/_tax_fund_service.py create mode 100644 stripe/params/_gift_card_activate_params.py create mode 100644 stripe/params/_gift_card_cashout_params.py create mode 100644 stripe/params/_gift_card_check_balance_params.py create mode 100644 stripe/params/_gift_card_create_params.py create mode 100644 stripe/params/_gift_card_operation_retrieve_params.py create mode 100644 stripe/params/_gift_card_reload_params.py create mode 100644 stripe/params/_gift_card_retrieve_params.py create mode 100644 stripe/params/_gift_card_void_operation_params.py create mode 100644 stripe/params/_payment_intent_update_crypto_refund_address_params.py create mode 100644 stripe/params/_tax_fund_list_params.py create mode 100644 stripe/params/_tax_fund_retrieve_params.py diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index a96b40070..3bd5d7929 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -5fab6377244519650455ed4213e07c477c0bfece \ No newline at end of file +1d5fb9dc5cd047376b47f4bbb9af90300932ea60 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bd44999eb..c1a4a1a30 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2290 \ No newline at end of file +v2291 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 61afc44e3..9c0d93249 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -399,6 +399,14 @@ def add_beta_version( ) from stripe._fx_quote import FxQuote as FxQuote from stripe._fx_quote_service import FxQuoteService as FxQuoteService + from stripe._gift_card import GiftCard as GiftCard + from stripe._gift_card_operation import ( + GiftCardOperation as GiftCardOperation, + ) + from stripe._gift_card_operation_service import ( + GiftCardOperationService as GiftCardOperationService, + ) + from stripe._gift_card_service import GiftCardService as GiftCardService from stripe._http_client import ( AIOHTTPClient as AIOHTTPClient, HTTPClient as HTTPClient, @@ -628,6 +636,8 @@ def add_beta_version( from stripe._tax_deducted_at_source import ( TaxDeductedAtSource as TaxDeductedAtSource, ) + from stripe._tax_fund import TaxFund as TaxFund + from stripe._tax_fund_service import TaxFundService as TaxFundService from stripe._tax_id import TaxId as TaxId from stripe._tax_id_service import TaxIdService as TaxIdService from stripe._tax_rate import TaxRate as TaxRate @@ -880,6 +890,10 @@ def add_beta_version( "FundingInstructions": ("stripe._funding_instructions", False), "FxQuote": ("stripe._fx_quote", False), "FxQuoteService": ("stripe._fx_quote_service", False), + "GiftCard": ("stripe._gift_card", False), + "GiftCardOperation": ("stripe._gift_card_operation", False), + "GiftCardOperationService": ("stripe._gift_card_operation_service", False), + "GiftCardService": ("stripe._gift_card_service", False), "AIOHTTPClient": ("stripe._http_client", False), "HTTPClient": ("stripe._http_client", False), "HTTPXClient": ("stripe._http_client", False), @@ -1056,6 +1070,8 @@ def add_beta_version( "TaxCode": ("stripe._tax_code", False), "TaxCodeService": ("stripe._tax_code_service", False), "TaxDeductedAtSource": ("stripe._tax_deducted_at_source", False), + "TaxFund": ("stripe._tax_fund", False), + "TaxFundService": ("stripe._tax_fund_service", False), "TaxId": ("stripe._tax_id", False), "TaxIdService": ("stripe._tax_id_service", False), "TaxRate": ("stripe._tax_rate", False), diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 00cdb7396..d01afafa6 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-06-03.preview" + CURRENT = "2026-06-10.preview" diff --git a/stripe/_charge.py b/stripe/_charge.py index 20c5fa1db..e2f32e4aa 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -489,10 +489,18 @@ class AccountFunding(StripeObject): """ class Benefits(StripeObject): + class FrMealVoucher(StripeObject): + siret: str + """ + The 14-digit SIRET of the meal voucher acceptor used for this charge. + """ + + fr_meal_voucher: Optional[FrMealVoucher] issuer: Optional[str] """ Issuer of the benefit card utilized on this payment """ + _inner_class_types = {"fr_meal_voucher": FrMealVoucher} class Checks(StripeObject): address_line1_check: Optional[str] @@ -982,6 +990,12 @@ class ShippingAddress(StripeObject): } class CardPresent(StripeObject): + class Multicapture(StripeObject): + status: Literal["available", "unavailable"] + """ + Indicates whether or not multiple captures are supported. + """ + class Offline(StripeObject): stored_at: Optional[int] """ @@ -1120,6 +1134,7 @@ class Wallet(StripeObject): """ ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. """ + multicapture: Optional[Multicapture] network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -1170,6 +1185,7 @@ class Wallet(StripeObject): """ wallet: Optional[Wallet] _inner_class_types = { + "multicapture": Multicapture, "offline": Offline, "reauthorization": Reauthorization, "receipt": Receipt, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index b1c673016..1edb48854 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -263,6 +263,12 @@ class Checks(StripeObject): class GeneratedFrom(StripeObject): class PaymentMethodDetails(StripeObject): class CardPresent(StripeObject): + class Multicapture(StripeObject): + status: Literal["available", "unavailable"] + """ + Indicates whether or not multiple captures are supported. + """ + class Offline(StripeObject): stored_at: Optional[int] """ @@ -406,6 +412,7 @@ class Wallet(StripeObject): """ ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. """ + multicapture: Optional[Multicapture] network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -456,6 +463,7 @@ class Wallet(StripeObject): """ wallet: Optional[Wallet] _inner_class_types = { + "multicapture": Multicapture, "offline": Offline, "reauthorization": Reauthorization, "receipt": Receipt, diff --git a/stripe/_gift_card.py b/stripe/_gift_card.py new file mode 100644 index 000000000..60a7297ac --- /dev/null +++ b/stripe/_gift_card.py @@ -0,0 +1,663 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._expandable_field import ExpandableField +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._gift_card_operation import GiftCardOperation + from stripe.params._gift_card_activate_params import GiftCardActivateParams + from stripe.params._gift_card_cashout_params import GiftCardCashoutParams + from stripe.params._gift_card_check_balance_params import ( + GiftCardCheckBalanceParams, + ) + from stripe.params._gift_card_create_params import GiftCardCreateParams + from stripe.params._gift_card_reload_params import GiftCardReloadParams + from stripe.params._gift_card_retrieve_params import GiftCardRetrieveParams + from stripe.params._gift_card_void_operation_params import ( + GiftCardVoidOperationParams, + ) + + +class GiftCard(CreateableAPIResource["GiftCard"]): + """ + Represents third-party gift cards that can be used as a payment method through Stripe. + """ + + OBJECT_NAME: ClassVar[Literal["gift_card"]] = "gift_card" + brand: Literal["fiserv_valuelink", "givex", "svs"] + """ + The brand of the gift card. + """ + exp_month: Optional[int] + """ + The expiration month of the gift card. + """ + exp_year: Optional[int] + """ + The expiration year of the gift card. + """ + id: str + """ + Unique identifier for the object. + """ + last4: Optional[str] + """ + The last four digits of the gift card number. + """ + last_operation: Optional[ExpandableField["GiftCardOperation"]] + """ + The last operation performed on this gift card. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + object: Literal["gift_card"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + + @classmethod + def _cls_activate( + cls, gift_card: str, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + cls._static_request( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def activate( + gift_card: str, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + ... + + @overload + def activate( + self, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + ... + + @class_method_variant("_cls_activate") + def activate( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_activate_async( + cls, gift_card: str, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + await cls._static_request_async( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def activate_async( + gift_card: str, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + ... + + @overload + async def activate_async( + self, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + ... + + @class_method_variant("_cls_activate_async") + async def activate_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardActivateParams"] + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def _cls_cashout( + cls, gift_card: str, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + cls._static_request( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def cashout( + gift_card: str, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + ... + + @overload + def cashout( + self, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + ... + + @class_method_variant("_cls_cashout") + def cashout( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_cashout_async( + cls, gift_card: str, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + await cls._static_request_async( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def cashout_async( + gift_card: str, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + ... + + @overload + async def cashout_async( + self, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + ... + + @class_method_variant("_cls_cashout_async") + async def cashout_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardCashoutParams"] + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def _cls_check_balance( + cls, gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + cls._static_request( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def check_balance( + gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + ... + + @overload + def check_balance( + self, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + ... + + @class_method_variant("_cls_check_balance") + def check_balance( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_check_balance_async( + cls, gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + await cls._static_request_async( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def check_balance_async( + gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + ... + + @overload + async def check_balance_async( + self, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + ... + + @class_method_variant("_cls_check_balance_async") + async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardCheckBalanceParams"] + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def create(cls, **params: Unpack["GiftCardCreateParams"]) -> "GiftCard": + """ + Creates a gift card object. + """ + return cast( + "GiftCard", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["GiftCardCreateParams"] + ) -> "GiftCard": + """ + Creates a gift card object. + """ + return cast( + "GiftCard", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def _cls_reload( + cls, gift_card: str, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + cls._static_request( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def reload( + gift_card: str, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + ... + + @overload + def reload( + self, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + ... + + @class_method_variant("_cls_reload") + def reload( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_reload_async( + cls, gift_card: str, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + await cls._static_request_async( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def reload_async( + gift_card: str, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + ... + + @overload + async def reload_async( + self, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + ... + + @class_method_variant("_cls_reload_async") + async def reload_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardReloadParams"] + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["GiftCardRetrieveParams"] + ) -> "GiftCard": + """ + Retrieves a third-party gift card object. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["GiftCardRetrieveParams"] + ) -> "GiftCard": + """ + Retrieves a third-party gift card object. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def _cls_void_operation( + cls, gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + cls._static_request( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def void_operation( + gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + ... + + @overload + def void_operation( + self, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + ... + + @class_method_variant("_cls_void_operation") + def void_operation( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_void_operation_async( + cls, gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + await cls._static_request_async( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(gift_card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def void_operation_async( + gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + ... + + @overload + async def void_operation_async( + self, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + ... + + @class_method_variant("_cls_void_operation_async") + async def void_operation_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["GiftCardVoidOperationParams"] + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) diff --git a/stripe/_gift_card_operation.py b/stripe/_gift_card_operation.py new file mode 100644 index 000000000..459ac59e0 --- /dev/null +++ b/stripe/_gift_card_operation.py @@ -0,0 +1,316 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_resource import APIResource +from stripe._expandable_field import ExpandableField +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._gift_card import GiftCard + from stripe.params._gift_card_operation_retrieve_params import ( + GiftCardOperationRetrieveParams, + ) + + +class GiftCardOperation(APIResource["GiftCardOperation"]): + """ + A GiftCardOperation represents an operation performed on a third-party gift card, + such as activation, deactivation, reload, cashout, balance check, or void. + """ + + OBJECT_NAME: ClassVar[Literal["gift_card_operation"]] = ( + "gift_card_operation" + ) + + class Activation(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + _inner_class_types = {"balance": Balance} + + class ActivationVoid(StripeObject): + voided_operation: str + """ + The operation that was voided. + """ + + class BalanceCheck(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + _inner_class_types = {"balance": Balance} + + class Cashout(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + class PreviousBalance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + previous_balance: Optional[PreviousBalance] + """ + The balance before the operation. + """ + _inner_class_types = { + "balance": Balance, + "previous_balance": PreviousBalance, + } + + class CashoutVoid(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + voided_operation: str + """ + The operation that was voided. + """ + _inner_class_types = {"balance": Balance} + + class Deactivation(StripeObject): + pass + + class Reload(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + class PreviousBalance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + previous_balance: Optional[PreviousBalance] + """ + The balance before the operation. + """ + _inner_class_types = { + "balance": Balance, + "previous_balance": PreviousBalance, + } + + class ReloadVoid(StripeObject): + class Balance(StripeObject): + amount: int + """ + The balance amount. + """ + currency: str + """ + The currency of the balance. + """ + + balance: Balance + """ + The balance amount of a gift card, including currency and amount. + """ + voided_operation: str + """ + The operation that was voided. + """ + _inner_class_types = {"balance": Balance} + + activation: Optional[Activation] + """ + Details about a gift card activation operation. + """ + activation_void: Optional[ActivationVoid] + """ + Details about a gift card activation void operation. + """ + balance_check: Optional[BalanceCheck] + """ + Details about a gift card balance check operation. + """ + cashout: Optional[Cashout] + """ + Details about a gift card cashout operation. + """ + cashout_void: Optional[CashoutVoid] + """ + Details about a gift card cashout void operation. + """ + completed_at: int + """ + The timestamp of when this operation was completed. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + deactivation: Optional[Deactivation] + """ + Details about a gift card deactivation operation. + """ + failure_code: Optional[ + Literal[ + "action_not_supported", + "card_already_activated", + "card_expired", + "card_not_activated", + "do_not_honor", + "generic_failure", + "insufficient_balance", + "invalid_amount", + "invalid_currency", + "invalid_number", + "invalid_pin", + "invalid_track_data", + "lost_card", + "lost_or_stolen_card", + "pin_required", + "pin_tries_exceeded", + "processing_error", + "provider_unavailable", + "stolen_card", + "suspected_fraud", + "timeout", + ] + ] + """ + The failure code of the operation. Only present if the status is failed. + """ + gift_card: ExpandableField["GiftCard"] + """ + The gift card this operation was performed on. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + object: Literal["gift_card_operation"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + on_behalf_of: Optional[str] + """ + The connected account whose credentials were used to perform this operation. + """ + reload: Optional[Reload] + """ + Details about a gift card reload operation. + """ + reload_void: Optional[ReloadVoid] + """ + Details about a gift card reload void operation. + """ + status: Literal["failed", "succeeded"] + """ + The status of the operation. + """ + type: Literal[ + "activation", + "activation_void", + "balance_check", + "cashout", + "cashout_void", + "deactivation", + "reload", + "reload_void", + ] + """ + The type of operation performed. + """ + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["GiftCardOperationRetrieveParams"] + ) -> "GiftCardOperation": + """ + Retrieves a third-party gift card operation object. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["GiftCardOperationRetrieveParams"] + ) -> "GiftCardOperation": + """ + Retrieves a third-party gift card operation object. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = { + "activation": Activation, + "activation_void": ActivationVoid, + "balance_check": BalanceCheck, + "cashout": Cashout, + "cashout_void": CashoutVoid, + "deactivation": Deactivation, + "reload": Reload, + "reload_void": ReloadVoid, + } diff --git a/stripe/_gift_card_operation_service.py b/stripe/_gift_card_operation_service.py new file mode 100644 index 000000000..7b1c65e00 --- /dev/null +++ b/stripe/_gift_card_operation_service.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._gift_card_operation import GiftCardOperation + from stripe._request_options import RequestOptions + from stripe.params._gift_card_operation_retrieve_params import ( + GiftCardOperationRetrieveParams, + ) + + +class GiftCardOperationService(StripeService): + def retrieve( + self, + id: str, + params: Optional["GiftCardOperationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Retrieves a third-party gift card operation object. + """ + return cast( + "GiftCardOperation", + self._request( + "get", + "/v1/gift_card_operations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["GiftCardOperationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Retrieves a third-party gift card operation object. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "get", + "/v1/gift_card_operations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_gift_card_service.py b/stripe/_gift_card_service.py new file mode 100644 index 000000000..27c774673 --- /dev/null +++ b/stripe/_gift_card_service.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._gift_card import GiftCard + from stripe._gift_card_operation import GiftCardOperation + from stripe._request_options import RequestOptions + from stripe.params._gift_card_activate_params import GiftCardActivateParams + from stripe.params._gift_card_cashout_params import GiftCardCashoutParams + from stripe.params._gift_card_check_balance_params import ( + GiftCardCheckBalanceParams, + ) + from stripe.params._gift_card_create_params import GiftCardCreateParams + from stripe.params._gift_card_reload_params import GiftCardReloadParams + from stripe.params._gift_card_retrieve_params import GiftCardRetrieveParams + from stripe.params._gift_card_void_operation_params import ( + GiftCardVoidOperationParams, + ) + + +class GiftCardService(StripeService): + def retrieve( + self, + gift_card: str, + params: Optional["GiftCardRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCard": + """ + Retrieves a third-party gift card object. + """ + return cast( + "GiftCard", + self._request( + "get", + "/v1/gift_cards/{gift_card}".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + gift_card: str, + params: Optional["GiftCardRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCard": + """ + Retrieves a third-party gift card object. + """ + return cast( + "GiftCard", + await self._request_async( + "get", + "/v1/gift_cards/{gift_card}".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "GiftCardCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCard": + """ + Creates a gift card object. + """ + return cast( + "GiftCard", + self._request( + "post", + "/v1/gift_cards", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "GiftCardCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCard": + """ + Creates a gift card object. + """ + return cast( + "GiftCard", + await self._request_async( + "post", + "/v1/gift_cards", + base_address="api", + params=params, + options=options, + ), + ) + + def activate( + self, + gift_card: str, + params: Optional["GiftCardActivateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def activate_async( + self, + gift_card: str, + params: Optional["GiftCardActivateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Activates a third-party gift card and optionally sets its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/activate".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cashout( + self, + gift_card: str, + params: Optional["GiftCardCashoutParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cashout_async( + self, + gift_card: str, + params: Optional["GiftCardCashoutParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Cashout a third-party gift card by zeroing its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/cashout".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def check_balance( + self, + gift_card: str, + params: Optional["GiftCardCheckBalanceParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def check_balance_async( + self, + gift_card: str, + params: Optional["GiftCardCheckBalanceParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Checks the balance of a third-party gift card. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/check_balance".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def reload( + self, + gift_card: str, + params: "GiftCardReloadParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def reload_async( + self, + gift_card: str, + params: "GiftCardReloadParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Reloads a third-party gift card by adding the specified amount to its balance. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/reload".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def void_operation( + self, + gift_card: str, + params: "GiftCardVoidOperationParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + self._request( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def void_operation_async( + self, + gift_card: str, + params: "GiftCardVoidOperationParams", + options: Optional["RequestOptions"] = None, + ) -> "GiftCardOperation": + """ + Voids a previously performed gift card operation. + """ + return cast( + "GiftCardOperation", + await self._request_async( + "post", + "/v1/gift_cards/{gift_card}/void_operation".format( + gift_card=sanitize_id(gift_card), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 582ae994f..d7d73b7fa 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -184,6 +184,11 @@ "FundingInstructions", ), "fx_quote": ("stripe._fx_quote", "FxQuote"), + "gift_card": ("stripe._gift_card", "GiftCard"), + "gift_card_operation": ( + "stripe._gift_card_operation", + "GiftCardOperation", + ), "identity.blocklist_entry": ( "stripe.identity._blocklist_entry", "BlocklistEntry", @@ -385,6 +390,7 @@ "stripe._tax_deducted_at_source", "TaxDeductedAtSource", ), + "tax_fund": ("stripe._tax_fund", "TaxFund"), "tax_id": ("stripe._tax_id", "TaxId"), "tax_rate": ("stripe._tax_rate", "TaxRate"), "terminal.configuration": ( diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 2dbaa13bc..95802eb77 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -725,6 +725,12 @@ class GooglePay(StripeObject): } class CardPresent(StripeObject): + class Multicapture(StripeObject): + status: Literal["available", "unavailable"] + """ + Indicates whether or not multiple captures are supported. + """ + class Offline(StripeObject): stored_at: Optional[int] """ @@ -863,6 +869,7 @@ class Wallet(StripeObject): """ ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. """ + multicapture: Optional[Multicapture] network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -913,6 +920,7 @@ class Wallet(StripeObject): """ wallet: Optional[Wallet] _inner_class_types = { + "multicapture": Multicapture, "offline": Offline, "reauthorization": Reauthorization, "receipt": Receipt, @@ -2212,17 +2220,52 @@ class Custom(StripeObject): An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. """ + class FiservValuelink(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + + class Givex(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + + class Svs(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + custom: Optional[Custom] """ Custom processors represent payment processors not modeled directly in the Stripe API. This resource consists of details about the custom processor used for this payment attempt. """ - type: Literal["custom"] + fiserv_valuelink: Optional[FiservValuelink] + """ + Represents the Fiserv ValueLink gift card processor. + """ + givex: Optional[Givex] + """ + Represents the Givex gift card processor. + """ + svs: Optional[Svs] + """ + Represents the SVS gift card processor. + """ + type: Literal["custom", "fiserv_valuelink", "givex", "svs"] """ The processor used for this payment attempt. """ - _inner_class_types = {"custom": Custom} + _inner_class_types = { + "custom": Custom, + "fiserv_valuelink": FiservValuelink, + "givex": Givex, + "svs": Svs, + } class ShippingDetails(StripeObject): class Address(StripeObject): diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index e9c13ebd0..40171559e 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -35,6 +35,7 @@ PaymentIntentAmountDetailsLineItem, ) from stripe._payment_method import PaymentMethod + from stripe._payment_record import PaymentRecord from stripe._profile import Profile from stripe._review import Review from stripe._setup_intent import SetupIntent @@ -84,6 +85,9 @@ from stripe.params._payment_intent_trigger_action_params import ( PaymentIntentTriggerActionParams, ) + from stripe.params._payment_intent_update_crypto_refund_address_params import ( + PaymentIntentUpdateCryptoRefundAddressParams, + ) from stripe.params._payment_intent_verify_microdeposits_params import ( PaymentIntentVerifyMicrodepositsParams, ) @@ -141,12 +145,6 @@ class Overcapture(StripeObject): Indicates whether overcapture is supported. """ - class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] - """ - Indicates whether the feature is supported. - """ - capture_before: Optional[int] """ Timestamp at which the authorization will expire if not captured. @@ -155,17 +153,11 @@ class Reauthorization(StripeObject): incremental_authorization: Optional[IncrementalAuthorization] multicapture: Optional[Multicapture] overcapture: Optional[Overcapture] - reauthorization: Optional[Reauthorization] - reauthorize_before: Optional[int] - """ - Timestamp at which the reauthorization window closes. - """ _inner_class_types = { "decremental_authorization": DecrementalAuthorization, "incremental_authorization": IncrementalAuthorization, "multicapture": Multicapture, "overcapture": Overcapture, - "reauthorization": Reauthorization, } class AgentDetails(StripeObject): @@ -712,6 +704,10 @@ class SupportedToken(StripeObject): """ Address of the deposit address. """ + refund_address: Optional[str] + """ + The wallet address that should receive refunds for deposits on this network. + """ supported_tokens: List[SupportedToken] """ The token currencies supported on this network. @@ -733,6 +729,10 @@ class SupportedToken(StripeObject): """ Address of the deposit address. """ + refund_address: Optional[str] + """ + The wallet address that should receive refunds for deposits on this network. + """ supported_tokens: List[SupportedToken] """ The token currencies supported on this network. @@ -754,6 +754,10 @@ class SupportedToken(StripeObject): """ Address of the deposit address. """ + refund_address: Optional[str] + """ + The wallet address that should receive refunds for deposits on this network. + """ supported_tokens: List[SupportedToken] """ The token currencies supported on this network. @@ -3203,6 +3207,10 @@ class BillingInterval(StripeObject): Fleet data for this PaymentIntent. """ flight_data: Optional[List[FlightDatum]] + location: Optional[str] + """ + The Payment Location associated with this PaymentIntent. + """ lodging_data: Optional[List[LodgingDatum]] money_services: Optional[MoneyServices] order_reference: Optional[str] @@ -3456,6 +3464,20 @@ class Boleto(StripeObject): """ class Card(StripeObject): + class CaptureDelay(StripeObject): + days: Optional[int] + """ + The number of days to delay the capture of the funds. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ + hours: Optional[int] + """ + The number of hours to delay the capture of the funds. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ + class Installments(StripeObject): class AvailablePlan(StripeObject): count: Optional[int] @@ -3576,6 +3598,15 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + capture_by: Optional[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: Optional[CaptureDelay] capture_method: Optional[Literal["manual"]] """ Controls when the funds will be captured from the customer's account. @@ -3678,12 +3709,27 @@ class Address(StripeObject): """ statement_details: Optional[StatementDetails] _inner_class_types = { + "capture_delay": CaptureDelay, "installments": Installments, "mandate_options": MandateOptions, "statement_details": StatementDetails, } class CardPresent(StripeObject): + class CaptureDelay(StripeObject): + days: Optional[int] + """ + The number of days to delay the capture of the funds. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ + hours: Optional[int] + """ + The number of hours to delay the capture of the funds. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ + class Routing(StripeObject): requested_priority: Optional[ Literal["domestic", "international"] @@ -3692,6 +3738,15 @@ class Routing(StripeObject): Requested routing priority """ + capture_by: Optional[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: Optional[CaptureDelay] capture_method: Optional[Literal["manual", "manual_preferred"]] """ Controls when the funds will be captured from the customer's account. @@ -3704,12 +3759,19 @@ class Routing(StripeObject): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ + request_multicapture: Optional[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ request_reauthorization: Optional[Literal["if_available", "never"]] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ routing: Optional[Routing] - _inner_class_types = {"routing": Routing} + _inner_class_types = { + "capture_delay": CaptureDelay, + "routing": Routing, + } class Cashapp(StripeObject): capture_method: Optional[Literal["manual"]] @@ -3741,7 +3803,9 @@ class DepositOptions(StripeObject): """ deposit_options: Optional[DepositOptions] - mode: Optional[Literal["default", "deposit"]] + mode: Optional[ + Literal["default", "deposit", "transaction_verification"] + ] """ The mode of the crypto payment. """ @@ -5111,6 +5175,10 @@ class PaymentData(StripeObject): """ ID of the latest [Charge object](https://docs.stripe.com/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. """ + latest_payment_attempt_record: Optional[str] + """ + ID of the latest [Payment Attempt Record object](https://docs.stripe.com/api/payment-attempt-record) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + """ livemode: bool """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. @@ -5155,6 +5223,10 @@ class PaymentData(StripeObject): """ The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ + payment_record: Optional[ExpandableField["PaymentRecord"]] + """ + ID of the [Payment Record object](https://docs.stripe.com/api/payment-record) created by this PaymentIntent. + """ payments_orchestration: Optional[PaymentsOrchestration] """ When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard. @@ -6967,6 +7039,122 @@ async def trigger_action_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_update_crypto_refund_address( + cls, + intent: str, + **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + cls._static_request( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(intent) + ), + params=params, + ), + ) + + @overload + @staticmethod + def update_crypto_refund_address( + intent: str, + **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + ... + + @overload + def update_crypto_refund_address( + self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + ... + + @class_method_variant("_cls_update_crypto_refund_address") + def update_crypto_refund_address( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + self._request( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_update_crypto_refund_address_async( + cls, + intent: str, + **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + await cls._static_request_async( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(intent) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def update_crypto_refund_address_async( + intent: str, + **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + ... + + @overload + async def update_crypto_refund_address_async( + self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + ... + + @class_method_variant("_cls_update_crypto_refund_address_async") + async def update_crypto_refund_address_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + await self._request_async( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + @classmethod def _cls_verify_microdeposits( cls, diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index e5adaa12c..e71ded881 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -50,6 +50,9 @@ from stripe.params._payment_intent_trigger_action_params import ( PaymentIntentTriggerActionParams, ) + from stripe.params._payment_intent_update_crypto_refund_address_params import ( + PaymentIntentUpdateCryptoRefundAddressParams, + ) from stripe.params._payment_intent_update_params import ( PaymentIntentUpdateParams, ) @@ -809,6 +812,50 @@ async def reauthorize_async( ), ) + def update_crypto_refund_address( + self, + intent: str, + params: "PaymentIntentUpdateCryptoRefundAddressParams", + options: Optional["RequestOptions"] = None, + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + self._request( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(intent), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_crypto_refund_address_async( + self, + intent: str, + params: "PaymentIntentUpdateCryptoRefundAddressParams", + options: Optional["RequestOptions"] = None, + ) -> "PaymentIntent": + """ + Updates the refund address for a static crypto deposit PaymentIntent on the specified network. + """ + return cast( + "PaymentIntent", + await self._request_async( + "post", + "/v1/payment_intents/{intent}/update_crypto_refund_address".format( + intent=sanitize_id(intent), + ), + base_address="api", + params=params, + options=options, + ), + ) + def verify_microdeposits( self, intent: str, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index e2b04fa16..dc412d52e 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -218,6 +218,12 @@ class Checks(StripeObject): class GeneratedFrom(StripeObject): class PaymentMethodDetails(StripeObject): class CardPresent(StripeObject): + class Multicapture(StripeObject): + status: Literal["available", "unavailable"] + """ + Indicates whether or not multiple captures are supported. + """ + class Offline(StripeObject): stored_at: Optional[int] """ @@ -356,6 +362,7 @@ class Wallet(StripeObject): """ ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. """ + multicapture: Optional[Multicapture] network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -406,6 +413,7 @@ class Wallet(StripeObject): """ wallet: Optional[Wallet] _inner_class_types = { + "multicapture": Multicapture, "offline": Offline, "reauthorization": Reauthorization, "receipt": Receipt, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 8225fde64..a1d9bdb21 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -719,6 +719,12 @@ class GooglePay(StripeObject): } class CardPresent(StripeObject): + class Multicapture(StripeObject): + status: Literal["available", "unavailable"] + """ + Indicates whether or not multiple captures are supported. + """ + class Offline(StripeObject): stored_at: Optional[int] """ @@ -857,6 +863,7 @@ class Wallet(StripeObject): """ ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. """ + multicapture: Optional[Multicapture] network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -907,6 +914,7 @@ class Wallet(StripeObject): """ wallet: Optional[Wallet] _inner_class_types = { + "multicapture": Multicapture, "offline": Offline, "reauthorization": Reauthorization, "receipt": Receipt, @@ -2206,17 +2214,52 @@ class Custom(StripeObject): An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. """ + class FiservValuelink(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + + class Givex(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + + class Svs(StripeObject): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + custom: Optional[Custom] """ Custom processors represent payment processors not modeled directly in the Stripe API. This resource consists of details about the custom processor used for this payment attempt. """ - type: Literal["custom"] + fiserv_valuelink: Optional[FiservValuelink] + """ + Represents the Fiserv ValueLink gift card processor. + """ + givex: Optional[Givex] + """ + Represents the Givex gift card processor. + """ + svs: Optional[Svs] + """ + Represents the SVS gift card processor. + """ + type: Literal["custom", "fiserv_valuelink", "givex", "svs"] """ The processor used for this payment attempt. """ - _inner_class_types = {"custom": Custom} + _inner_class_types = { + "custom": Custom, + "fiserv_valuelink": FiservValuelink, + "givex": Givex, + "svs": Svs, + } class ShippingDetails(StripeObject): class Address(StripeObject): diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index cd63fd2d0..bac441c51 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -965,6 +965,10 @@ class FrMealVoucher(StripeObject): _inner_class_types = {"fr_meal_voucher": FrMealVoucher} benefit: Optional[Benefit] + location: Optional[str] + """ + The Payment Location associated with this SetupIntent. + """ _inner_class_types = {"benefit": Benefit} application: Optional[ExpandableField["Application"]] diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index ac1c4196c..d0ba16db8 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -86,6 +86,8 @@ FrMealVouchersOnboardingService, ) from stripe._fx_quote_service import FxQuoteService + from stripe._gift_card_service import GiftCardService + from stripe._gift_card_operation_service import GiftCardOperationService from stripe._identity_service import IdentityService from stripe._invoice_service import InvoiceService from stripe._invoice_item_service import InvoiceItemService @@ -141,6 +143,7 @@ ) from stripe._tax_service import TaxService from stripe._tax_code_service import TaxCodeService + from stripe._tax_fund_service import TaxFundService from stripe._tax_id_service import TaxIdService from stripe._tax_rate_service import TaxRateService from stripe._terminal_service import TerminalService @@ -778,6 +781,28 @@ def fr_meal_vouchers_onboardings( def fx_quotes(self) -> "FxQuoteService": return self.v1.fx_quotes + @property + @deprecated( + """ + StripeClient.gift_cards is deprecated, use StripeClient.v1.gift_cards instead. + All functionality under it has been copied over to StripeClient.v1.gift_cards. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def gift_cards(self) -> "GiftCardService": + return self.v1.gift_cards + + @property + @deprecated( + """ + StripeClient.gift_card_operations is deprecated, use StripeClient.v1.gift_card_operations instead. + All functionality under it has been copied over to StripeClient.v1.gift_card_operations. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def gift_card_operations(self) -> "GiftCardOperationService": + return self.v1.gift_card_operations + @property @deprecated( """ @@ -1255,6 +1280,17 @@ def tax(self) -> "TaxService": def tax_codes(self) -> "TaxCodeService": return self.v1.tax_codes + @property + @deprecated( + """ + StripeClient.tax_funds is deprecated, use StripeClient.v1.tax_funds instead. + All functionality under it has been copied over to StripeClient.v1.tax_funds. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def tax_funds(self) -> "TaxFundService": + return self.v1.tax_funds + @property @deprecated( """ diff --git a/stripe/_tax_fund.py b/stripe/_tax_fund.py new file mode 100644 index 000000000..114f4e98b --- /dev/null +++ b/stripe/_tax_fund.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._balance_transaction import BalanceTransaction + from stripe.params._tax_fund_list_params import TaxFundListParams + from stripe.params._tax_fund_retrieve_params import TaxFundRetrieveParams + + +class TaxFund(ListableAPIResource["TaxFund"]): + """ + A TaxFund object represents a single tax float sweep event — funds moved between + a merchant's payments balance and their tax fund financial account for Stripe Tax obligations. + """ + + OBJECT_NAME: ClassVar[Literal["tax_fund"]] = "tax_fund" + + class Context(StripeObject): + checkout_session: Optional[str] + credit_note: Optional[str] + invoice: Optional[str] + payment_intent: Optional[str] + refund: Optional[str] + tax_transaction: Optional[str] + + class Destination(StripeObject): + class PaymentsBalance(StripeObject): + balance_transaction: ExpandableField["BalanceTransaction"] + + class TaxFundAccount(StripeObject): + financial_account: Optional[str] + transaction: Optional[str] + + payments_balance: Optional[PaymentsBalance] + """ + Details about the payments balance side of the sweep. + """ + tax_fund_account: Optional[TaxFundAccount] + """ + Details about the tax fund financial account side of the sweep. + """ + type: str + _inner_class_types = { + "payments_balance": PaymentsBalance, + "tax_fund_account": TaxFundAccount, + } + + class Source(StripeObject): + class PaymentsBalance(StripeObject): + balance_transaction: ExpandableField["BalanceTransaction"] + + class TaxFundAccount(StripeObject): + financial_account: Optional[str] + transaction: Optional[str] + + payments_balance: Optional[PaymentsBalance] + """ + Details about the payments balance side of the sweep. + """ + tax_fund_account: Optional[TaxFundAccount] + """ + Details about the tax fund financial account side of the sweep. + """ + type: str + _inner_class_types = { + "payments_balance": PaymentsBalance, + "tax_fund_account": TaxFundAccount, + } + + class Trigger(StripeObject): + balance_transaction: ExpandableField["BalanceTransaction"] + type: str + + amount: int + """ + Amount swept, in the smallest currency unit. Always positive. + """ + context: Optional[Context] + """ + Associated billing or tax documents for this sweep. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + destination: Destination + """ + Where funds moved to. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + object: Literal["tax_fund"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + source: Source + """ + Where funds moved from. + """ + trigger: Trigger + """ + What caused the sweep. + """ + + @classmethod + def list( + cls, **params: Unpack["TaxFundListParams"] + ) -> ListObject["TaxFund"]: + """ + Returns a list of tax funds in reverse chronological order. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["TaxFundListParams"] + ) -> ListObject["TaxFund"]: + """ + Returns a list of tax funds in reverse chronological order. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["TaxFundRetrieveParams"] + ) -> "TaxFund": + """ + Retrieves a tax fund object by its ID. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["TaxFundRetrieveParams"] + ) -> "TaxFund": + """ + Retrieves a tax fund object by its ID. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = { + "context": Context, + "destination": Destination, + "source": Source, + "trigger": Trigger, + } diff --git a/stripe/_tax_fund_service.py b/stripe/_tax_fund_service.py new file mode 100644 index 000000000..d4d495868 --- /dev/null +++ b/stripe/_tax_fund_service.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe._tax_fund import TaxFund + from stripe.params._tax_fund_list_params import TaxFundListParams + from stripe.params._tax_fund_retrieve_params import TaxFundRetrieveParams + + +class TaxFundService(StripeService): + def list( + self, + params: Optional["TaxFundListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TaxFund]": + """ + Returns a list of tax funds in reverse chronological order. + """ + return cast( + "ListObject[TaxFund]", + self._request( + "get", + "/v1/tax_funds", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["TaxFundListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TaxFund]": + """ + Returns a list of tax funds in reverse chronological order. + """ + return cast( + "ListObject[TaxFund]", + await self._request_async( + "get", + "/v1/tax_funds", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + tax_fund: str, + params: Optional["TaxFundRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TaxFund": + """ + Retrieves a tax fund object by its ID. + """ + return cast( + "TaxFund", + self._request( + "get", + "/v1/tax_funds/{tax_fund}".format( + tax_fund=sanitize_id(tax_fund), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + tax_fund: str, + params: Optional["TaxFundRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TaxFund": + """ + Retrieves a tax fund object by its ID. + """ + return cast( + "TaxFund", + await self._request_async( + "get", + "/v1/tax_funds/{tax_fund}".format( + tax_fund=sanitize_id(tax_fund), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_v1_services.py b/stripe/_v1_services.py index 102ab8e15..e124cf813 100644 --- a/stripe/_v1_services.py +++ b/stripe/_v1_services.py @@ -45,6 +45,8 @@ FrMealVouchersOnboardingService, ) from stripe._fx_quote_service import FxQuoteService + from stripe._gift_card_operation_service import GiftCardOperationService + from stripe._gift_card_service import GiftCardService from stripe._identity_service import IdentityService from stripe._invoice_item_service import InvoiceItemService from stripe._invoice_payment_service import InvoicePaymentService @@ -99,6 +101,7 @@ ) from stripe._subscription_service import SubscriptionService from stripe._tax_code_service import TaxCodeService + from stripe._tax_fund_service import TaxFundService from stripe._tax_id_service import TaxIdService from stripe._tax_rate_service import TaxRateService from stripe._tax_service import TaxService @@ -189,6 +192,11 @@ "FrMealVouchersOnboardingService", ], "fx_quotes": ["stripe._fx_quote_service", "FxQuoteService"], + "gift_cards": ["stripe._gift_card_service", "GiftCardService"], + "gift_card_operations": [ + "stripe._gift_card_operation_service", + "GiftCardOperationService", + ], "identity": ["stripe._identity_service", "IdentityService"], "invoices": ["stripe._invoice_service", "InvoiceService"], "invoice_items": ["stripe._invoice_item_service", "InvoiceItemService"], @@ -277,6 +285,7 @@ ], "tax": ["stripe._tax_service", "TaxService"], "tax_codes": ["stripe._tax_code_service", "TaxCodeService"], + "tax_funds": ["stripe._tax_fund_service", "TaxFundService"], "tax_ids": ["stripe._tax_id_service", "TaxIdService"], "tax_rates": ["stripe._tax_rate_service", "TaxRateService"], "terminal": ["stripe._terminal_service", "TerminalService"], @@ -329,6 +338,8 @@ class V1Services(StripeService): forwarding: "ForwardingService" fr_meal_vouchers_onboardings: "FrMealVouchersOnboardingService" fx_quotes: "FxQuoteService" + gift_cards: "GiftCardService" + gift_card_operations: "GiftCardOperationService" identity: "IdentityService" invoices: "InvoiceService" invoice_items: "InvoiceItemService" @@ -372,6 +383,7 @@ class V1Services(StripeService): subscription_schedules: "SubscriptionScheduleService" tax: "TaxService" tax_codes: "TaxCodeService" + tax_funds: "TaxFundService" tax_ids: "TaxIdService" tax_rates: "TaxRateService" terminal: "TerminalService" diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 0df866c89..e597e7e57 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -594,6 +594,7 @@ class Wallet(StripeObject): "elo", "girocard", "interac", + "jaywan", "jcb", "link", "maestro", @@ -651,6 +652,12 @@ class Link(StripeObject): Unique, encrypted bank account identifier. """ + class Pix(StripeObject): + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ + class SepaDebit(StripeObject): fingerprint: Optional[str] """ @@ -672,6 +679,7 @@ class UsBankAccount(StripeObject): boleto: Optional[Boleto] card: Optional[Card] link: Optional[Link] + pix: Optional[Pix] sepa_debit: Optional[SepaDebit] type: str """ @@ -684,6 +692,7 @@ class UsBankAccount(StripeObject): "boleto": Boleto, "card": Card, "link": Link, + "pix": Pix, "sepa_debit": SepaDebit, "us_bank_account": UsBankAccount, } diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index de4218ef1..0c35365ef 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -815,7 +815,7 @@ class Visa(StripeObject): Literal["approve", "decline", "recommend_id_and_v"] ] """ - Stripe's recommendation to the network for this token activation request, derived from the same risk signals used for the activation decision. + The network's recommendation to Stripe for this token activation request. """ token_reference_id: str """ diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 939c3a430..4196d51c8 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -447,6 +447,37 @@ class PreArbitrationSubmission(StripeObject): "pre_arbitration_submission": PreArbitrationSubmission, } + class ProvisionalCredit(StripeObject): + grant_deadline: Optional[int] + """ + The time by which the platform must grant a provisional credit to the consumer. + """ + granted_at: Optional[int] + """ + The time at which the platform reported granting the provisional credit. + """ + revocable_after: Optional[int] + """ + The earliest time after which the platform can revoke the provisional credit. + """ + revoked_at: Optional[int] + """ + The time at which the platform reported revoking the provisional credit. + """ + status: Literal[ + "delinquent", + "granted", + "not_required", + "permanent", + "required", + "revocable", + "revocation_notice_period", + "revoked", + ] + """ + The status of the provisional credit obligation. + """ + class Treasury(StripeObject): debit_reversal: Optional[str] """ @@ -525,6 +556,10 @@ class Treasury(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + provisional_credit: Optional[ProvisionalCredit] + """ + Provisional credit details for this dispute. + """ status: Literal["expired", "lost", "submitted", "unsubmitted", "won"] """ Current status of the dispute. @@ -1311,6 +1346,7 @@ def test_helpers(self): "crypto_transactions": CryptoTransaction, "evidence": Evidence, "network_lifecycle": NetworkLifecycle, + "provisional_credit": ProvisionalCredit, "treasury": Treasury, } diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 6d369a9d0..540013adc 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -269,7 +269,7 @@ class Visa(StripeObject): Literal["approve", "decline", "recommend_id_and_v"] ] """ - Stripe's recommendation to the network for this token activation request, derived from the same risk signals used for the activation decision. + The network's recommendation to Stripe for this token activation request. """ token_reference_id: str """ diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 66f99b20a..ec6c98fd3 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -810,14 +810,6 @@ ChargeCaptureParamsPaymentDetailsLodgingDelivery as ChargeCaptureParamsPaymentDetailsLodgingDelivery, ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient as ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient, ChargeCaptureParamsPaymentDetailsLodgingPassenger as ChargeCaptureParamsPaymentDetailsLodgingPassenger, - ChargeCaptureParamsPaymentDetailsMoneyServices as ChargeCaptureParamsPaymentDetailsMoneyServices, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFunding as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFunding, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress, - ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth as ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth, ChargeCaptureParamsPaymentDetailsSubscription as ChargeCaptureParamsPaymentDetailsSubscription, ChargeCaptureParamsPaymentDetailsSubscriptionAffiliate as ChargeCaptureParamsPaymentDetailsSubscriptionAffiliate, ChargeCaptureParamsPaymentDetailsSubscriptionBillingInterval as ChargeCaptureParamsPaymentDetailsSubscriptionBillingInterval, @@ -912,14 +904,6 @@ ChargeModifyParamsPaymentDetailsLodgingDelivery as ChargeModifyParamsPaymentDetailsLodgingDelivery, ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient as ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient, ChargeModifyParamsPaymentDetailsLodgingPassenger as ChargeModifyParamsPaymentDetailsLodgingPassenger, - ChargeModifyParamsPaymentDetailsMoneyServices as ChargeModifyParamsPaymentDetailsMoneyServices, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFunding as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFunding, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress, - ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth as ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth, ChargeModifyParamsPaymentDetailsSubscription as ChargeModifyParamsPaymentDetailsSubscription, ChargeModifyParamsPaymentDetailsSubscriptionAffiliate as ChargeModifyParamsPaymentDetailsSubscriptionAffiliate, ChargeModifyParamsPaymentDetailsSubscriptionBillingInterval as ChargeModifyParamsPaymentDetailsSubscriptionBillingInterval, @@ -1009,14 +993,6 @@ ChargeUpdateParamsPaymentDetailsLodgingDelivery as ChargeUpdateParamsPaymentDetailsLodgingDelivery, ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient as ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient, ChargeUpdateParamsPaymentDetailsLodgingPassenger as ChargeUpdateParamsPaymentDetailsLodgingPassenger, - ChargeUpdateParamsPaymentDetailsMoneyServices as ChargeUpdateParamsPaymentDetailsMoneyServices, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFunding as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFunding, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress, - ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth as ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth, ChargeUpdateParamsPaymentDetailsSubscription as ChargeUpdateParamsPaymentDetailsSubscription, ChargeUpdateParamsPaymentDetailsSubscriptionAffiliate as ChargeUpdateParamsPaymentDetailsSubscriptionAffiliate, ChargeUpdateParamsPaymentDetailsSubscriptionBillingInterval as ChargeUpdateParamsPaymentDetailsSubscriptionBillingInterval, @@ -1520,6 +1496,31 @@ from stripe.params._fx_quote_retrieve_params import ( FxQuoteRetrieveParams as FxQuoteRetrieveParams, ) + from stripe.params._gift_card_activate_params import ( + GiftCardActivateParams as GiftCardActivateParams, + GiftCardActivateParamsBalance as GiftCardActivateParamsBalance, + ) + from stripe.params._gift_card_cashout_params import ( + GiftCardCashoutParams as GiftCardCashoutParams, + ) + from stripe.params._gift_card_check_balance_params import ( + GiftCardCheckBalanceParams as GiftCardCheckBalanceParams, + ) + from stripe.params._gift_card_create_params import ( + GiftCardCreateParams as GiftCardCreateParams, + ) + from stripe.params._gift_card_operation_retrieve_params import ( + GiftCardOperationRetrieveParams as GiftCardOperationRetrieveParams, + ) + from stripe.params._gift_card_reload_params import ( + GiftCardReloadParams as GiftCardReloadParams, + ) + from stripe.params._gift_card_retrieve_params import ( + GiftCardRetrieveParams as GiftCardRetrieveParams, + ) + from stripe.params._gift_card_void_operation_params import ( + GiftCardVoidOperationParams as GiftCardVoidOperationParams, + ) from stripe.params._invoice_add_lines_params import ( InvoiceAddLinesParams as InvoiceAddLinesParams, InvoiceAddLinesParamsLine as InvoiceAddLinesParamsLine, @@ -2377,14 +2378,6 @@ PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery as PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery, PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger as PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger, - PaymentIntentCaptureParamsPaymentDetailsMoneyServices as PaymentIntentCaptureParamsPaymentDetailsMoneyServices, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFunding as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress, - PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth as PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth, PaymentIntentCaptureParamsPaymentDetailsSubscription as PaymentIntentCaptureParamsPaymentDetailsSubscription, PaymentIntentCaptureParamsPaymentDetailsSubscriptionAffiliate as PaymentIntentCaptureParamsPaymentDetailsSubscriptionAffiliate, PaymentIntentCaptureParamsPaymentDetailsSubscriptionBillingInterval as PaymentIntentCaptureParamsPaymentDetailsSubscriptionBillingInterval, @@ -2582,25 +2575,21 @@ PaymentIntentConfirmParamsPaymentMethodOptionsBlik as PaymentIntentConfirmParamsPaymentMethodOptionsBlik, PaymentIntentConfirmParamsPaymentMethodOptionsBoleto as PaymentIntentConfirmParamsPaymentMethodOptionsBoleto, PaymentIntentConfirmParamsPaymentMethodOptionsCard as PaymentIntentConfirmParamsPaymentMethodOptionsCard, + PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay, PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments as PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments, PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallmentsPlan as PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallmentsPlan, PaymentIntentConfirmParamsPaymentMethodOptionsCardMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsCardMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetails as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetails, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent, + PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, @@ -2909,25 +2898,21 @@ PaymentIntentCreateParamsPaymentMethodOptionsBlik as PaymentIntentCreateParamsPaymentMethodOptionsBlik, PaymentIntentCreateParamsPaymentMethodOptionsBoleto as PaymentIntentCreateParamsPaymentMethodOptionsBoleto, PaymentIntentCreateParamsPaymentMethodOptionsCard as PaymentIntentCreateParamsPaymentMethodOptionsCard, + PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay, PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments as PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments, PaymentIntentCreateParamsPaymentMethodOptionsCardInstallmentsPlan as PaymentIntentCreateParamsPaymentMethodOptionsCardInstallmentsPlan, PaymentIntentCreateParamsPaymentMethodOptionsCardMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsCardMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetails as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetails, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, PaymentIntentCreateParamsPaymentMethodOptionsCardPresent as PaymentIntentCreateParamsPaymentMethodOptionsCardPresent, + PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, @@ -3286,25 +3271,21 @@ PaymentIntentModifyParamsPaymentMethodOptionsBlik as PaymentIntentModifyParamsPaymentMethodOptionsBlik, PaymentIntentModifyParamsPaymentMethodOptionsBoleto as PaymentIntentModifyParamsPaymentMethodOptionsBoleto, PaymentIntentModifyParamsPaymentMethodOptionsCard as PaymentIntentModifyParamsPaymentMethodOptionsCard, + PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay, PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments as PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments, PaymentIntentModifyParamsPaymentMethodOptionsCardInstallmentsPlan as PaymentIntentModifyParamsPaymentMethodOptionsCardInstallmentsPlan, PaymentIntentModifyParamsPaymentMethodOptionsCardMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsCardMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetails as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetails, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, PaymentIntentModifyParamsPaymentMethodOptionsCardPresent as PaymentIntentModifyParamsPaymentMethodOptionsCardPresent, + PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, @@ -3437,6 +3418,9 @@ PaymentIntentTriggerActionParams as PaymentIntentTriggerActionParams, PaymentIntentTriggerActionParamsScanQrCode as PaymentIntentTriggerActionParamsScanQrCode, ) + from stripe.params._payment_intent_update_crypto_refund_address_params import ( + PaymentIntentUpdateCryptoRefundAddressParams as PaymentIntentUpdateCryptoRefundAddressParams, + ) from stripe.params._payment_intent_update_params import ( PaymentIntentUpdateParams as PaymentIntentUpdateParams, PaymentIntentUpdateParamsAllocatedFunds as PaymentIntentUpdateParamsAllocatedFunds, @@ -3628,25 +3612,21 @@ PaymentIntentUpdateParamsPaymentMethodOptionsBlik as PaymentIntentUpdateParamsPaymentMethodOptionsBlik, PaymentIntentUpdateParamsPaymentMethodOptionsBoleto as PaymentIntentUpdateParamsPaymentMethodOptionsBoleto, PaymentIntentUpdateParamsPaymentMethodOptionsCard as PaymentIntentUpdateParamsPaymentMethodOptionsCard, + PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay, PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments as PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments, PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallmentsPlan as PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallmentsPlan, PaymentIntentUpdateParamsPaymentMethodOptionsCardMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsCardMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetails as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetails, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent, + PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto, - PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchase, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchant, @@ -6165,6 +6145,13 @@ from stripe.params._tax_code_retrieve_params import ( TaxCodeRetrieveParams as TaxCodeRetrieveParams, ) + from stripe.params._tax_fund_list_params import ( + TaxFundListParams as TaxFundListParams, + TaxFundListParamsCreated as TaxFundListParamsCreated, + ) + from stripe.params._tax_fund_retrieve_params import ( + TaxFundRetrieveParams as TaxFundRetrieveParams, + ) from stripe.params._tax_id_create_params import ( TaxIdCreateParams as TaxIdCreateParams, TaxIdCreateParamsOwner as TaxIdCreateParamsOwner, @@ -8890,38 +8877,6 @@ "stripe.params._charge_capture_params", False, ), - "ChargeCaptureParamsPaymentDetailsMoneyServices": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress": ( - "stripe.params._charge_capture_params", - False, - ), - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth": ( - "stripe.params._charge_capture_params", - False, - ), "ChargeCaptureParamsPaymentDetailsSubscription": ( "stripe.params._charge_capture_params", False, @@ -9254,38 +9209,6 @@ "stripe.params._charge_modify_params", False, ), - "ChargeModifyParamsPaymentDetailsMoneyServices": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress": ( - "stripe.params._charge_modify_params", - False, - ), - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth": ( - "stripe.params._charge_modify_params", - False, - ), "ChargeModifyParamsPaymentDetailsSubscription": ( "stripe.params._charge_modify_params", False, @@ -9601,38 +9524,6 @@ "stripe.params._charge_update_params", False, ), - "ChargeUpdateParamsPaymentDetailsMoneyServices": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress": ( - "stripe.params._charge_update_params", - False, - ), - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth": ( - "stripe.params._charge_update_params", - False, - ), "ChargeUpdateParamsPaymentDetailsSubscription": ( "stripe.params._charge_update_params", False, @@ -10707,6 +10598,36 @@ "stripe.params._fx_quote_retrieve_params", False, ), + "GiftCardActivateParams": ( + "stripe.params._gift_card_activate_params", + False, + ), + "GiftCardActivateParamsBalance": ( + "stripe.params._gift_card_activate_params", + False, + ), + "GiftCardCashoutParams": ( + "stripe.params._gift_card_cashout_params", + False, + ), + "GiftCardCheckBalanceParams": ( + "stripe.params._gift_card_check_balance_params", + False, + ), + "GiftCardCreateParams": ("stripe.params._gift_card_create_params", False), + "GiftCardOperationRetrieveParams": ( + "stripe.params._gift_card_operation_retrieve_params", + False, + ), + "GiftCardReloadParams": ("stripe.params._gift_card_reload_params", False), + "GiftCardRetrieveParams": ( + "stripe.params._gift_card_retrieve_params", + False, + ), + "GiftCardVoidOperationParams": ( + "stripe.params._gift_card_void_operation_params", + False, + ), "InvoiceAddLinesParams": ( "stripe.params._invoice_add_lines_params", False, @@ -13571,38 +13492,6 @@ "stripe.params._payment_intent_capture_params", False, ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServices": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress": ( - "stripe.params._payment_intent_capture_params", - False, - ), - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth": ( - "stripe.params._payment_intent_capture_params", - False, - ), "PaymentIntentCaptureParamsPaymentDetailsSubscription": ( "stripe.params._payment_intent_capture_params", False, @@ -14383,6 +14272,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments": ( "stripe.params._payment_intent_confirm_params", False, @@ -14407,18 +14300,6 @@ "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( - "stripe.params._payment_intent_confirm_params", - False, - ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( - "stripe.params._payment_intent_confirm_params", - False, - ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( - "stripe.params._payment_intent_confirm_params", - False, - ), "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet": ( "stripe.params._payment_intent_confirm_params", False, @@ -14435,27 +14316,19 @@ "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails": ( + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( - "stripe.params._payment_intent_confirm_params", - False, - ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._payment_intent_confirm_params", - False, - ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( "stripe.params._payment_intent_confirm_params", False, ), @@ -15683,6 +15556,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments": ( "stripe.params._payment_intent_create_params", False, @@ -15707,18 +15584,6 @@ "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( - "stripe.params._payment_intent_create_params", - False, - ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( - "stripe.params._payment_intent_create_params", - False, - ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( - "stripe.params._payment_intent_create_params", - False, - ), "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet": ( "stripe.params._payment_intent_create_params", False, @@ -15735,27 +15600,19 @@ "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( - "stripe.params._payment_intent_create_params", - False, - ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( - "stripe.params._payment_intent_create_params", - False, - ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( "stripe.params._payment_intent_create_params", False, ), @@ -17151,6 +17008,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments": ( "stripe.params._payment_intent_modify_params", False, @@ -17175,18 +17036,6 @@ "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( - "stripe.params._payment_intent_modify_params", - False, - ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( - "stripe.params._payment_intent_modify_params", - False, - ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( - "stripe.params._payment_intent_modify_params", - False, - ), "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet": ( "stripe.params._payment_intent_modify_params", False, @@ -17203,27 +17052,19 @@ "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails": ( - "stripe.params._payment_intent_modify_params", - False, - ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( - "stripe.params._payment_intent_modify_params", - False, - ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( "stripe.params._payment_intent_modify_params", False, ), @@ -17711,6 +17552,10 @@ "stripe.params._payment_intent_trigger_action_params", False, ), + "PaymentIntentUpdateCryptoRefundAddressParams": ( + "stripe.params._payment_intent_update_crypto_refund_address_params", + False, + ), "PaymentIntentUpdateParams": ( "stripe.params._payment_intent_update_params", False, @@ -18471,6 +18316,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments": ( "stripe.params._payment_intent_update_params", False, @@ -18495,18 +18344,6 @@ "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( - "stripe.params._payment_intent_update_params", - False, - ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( - "stripe.params._payment_intent_update_params", - False, - ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( - "stripe.params._payment_intent_update_params", - False, - ), "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet": ( "stripe.params._payment_intent_update_params", False, @@ -18523,27 +18360,19 @@ "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( - "stripe.params._payment_intent_update_params", - False, - ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( - "stripe.params._payment_intent_update_params", - False, - ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset": ( + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto": ( + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices": ( "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity": ( + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding": ( "stripe.params._payment_intent_update_params", False, ), @@ -27045,6 +26874,12 @@ "stripe.params._tax_code_retrieve_params", False, ), + "TaxFundListParams": ("stripe.params._tax_fund_list_params", False), + "TaxFundListParamsCreated": ("stripe.params._tax_fund_list_params", False), + "TaxFundRetrieveParams": ( + "stripe.params._tax_fund_retrieve_params", + False, + ), "TaxIdCreateParams": ("stripe.params._tax_id_create_params", False), "TaxIdCreateParamsOwner": ("stripe.params._tax_id_create_params", False), "TaxIdDeleteParams": ("stripe.params._tax_id_delete_params", False), diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py index 235308b0a..ef5312c85 100644 --- a/stripe/params/_charge_capture_params.py +++ b/stripe/params/_charge_capture_params.py @@ -97,12 +97,6 @@ class ChargeCaptureParamsPaymentDetails(TypedDict): """ Lodging data for this PaymentIntent. """ - money_services: NotRequired[ - "Literal['']|ChargeCaptureParamsPaymentDetailsMoneyServices" - ] - """ - Money services details for this PaymentIntent. - """ order_reference: NotRequired["Literal['']|str"] """ A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. @@ -1963,194 +1957,6 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): """ -class ChargeCaptureParamsPaymentDetailsMoneyServices(TypedDict): - account_funding: NotRequired[ - "Literal['']|ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFunding" - ] - """ - Account funding transaction details including sender and beneficiary information. - """ - transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" - ] - """ - The type of money services transaction. - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFunding(TypedDict): - beneficiary_account: NotRequired[str] - """ - ID of the Account representing the beneficiary in this account funding transaction. - """ - beneficiary_details: NotRequired[ - "Literal['']|ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails" - ] - """ - Inline identity details for the beneficiary of this account funding transaction. - """ - sender_account: NotRequired[str] - """ - ID of the Account representing the sender in this account funding transaction. - """ - sender_details: NotRequired[ - "Literal['']|ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails" - ] - """ - Inline identity details for the sender of this account funding transaction. - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails( - TypedDict, -): - address: NotRequired[ - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails( - TypedDict, -): - address: NotRequired[ - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - class ChargeCaptureParamsPaymentDetailsSubscription(TypedDict): affiliate: NotRequired[ "ChargeCaptureParamsPaymentDetailsSubscriptionAffiliate" diff --git a/stripe/params/_charge_modify_params.py b/stripe/params/_charge_modify_params.py index 7e082e44b..000ed8fb0 100644 --- a/stripe/params/_charge_modify_params.py +++ b/stripe/params/_charge_modify_params.py @@ -101,12 +101,6 @@ class ChargeModifyParamsPaymentDetails(TypedDict): """ Lodging data for this PaymentIntent. """ - money_services: NotRequired[ - "Literal['']|ChargeModifyParamsPaymentDetailsMoneyServices" - ] - """ - Money services details for this PaymentIntent. - """ order_reference: NotRequired["Literal['']|str"] """ A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. @@ -1963,194 +1957,6 @@ class ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): """ -class ChargeModifyParamsPaymentDetailsMoneyServices(TypedDict): - account_funding: NotRequired[ - "Literal['']|ChargeModifyParamsPaymentDetailsMoneyServicesAccountFunding" - ] - """ - Account funding transaction details including sender and beneficiary information. - """ - transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" - ] - """ - The type of money services transaction. - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFunding(TypedDict): - beneficiary_account: NotRequired[str] - """ - ID of the Account representing the beneficiary in this account funding transaction. - """ - beneficiary_details: NotRequired[ - "Literal['']|ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails" - ] - """ - Inline identity details for the beneficiary of this account funding transaction. - """ - sender_account: NotRequired[str] - """ - ID of the Account representing the sender in this account funding transaction. - """ - sender_details: NotRequired[ - "Literal['']|ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails" - ] - """ - Inline identity details for the sender of this account funding transaction. - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails( - TypedDict, -): - address: NotRequired[ - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails( - TypedDict, -): - address: NotRequired[ - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeModifyParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - class ChargeModifyParamsPaymentDetailsSubscription(TypedDict): affiliate: NotRequired[ "ChargeModifyParamsPaymentDetailsSubscriptionAffiliate" diff --git a/stripe/params/_charge_update_params.py b/stripe/params/_charge_update_params.py index a6a7410a9..cbe4a4a75 100644 --- a/stripe/params/_charge_update_params.py +++ b/stripe/params/_charge_update_params.py @@ -100,12 +100,6 @@ class ChargeUpdateParamsPaymentDetails(TypedDict): """ Lodging data for this PaymentIntent. """ - money_services: NotRequired[ - "Literal['']|ChargeUpdateParamsPaymentDetailsMoneyServices" - ] - """ - Money services details for this PaymentIntent. - """ order_reference: NotRequired["Literal['']|str"] """ A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. @@ -1962,194 +1956,6 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): """ -class ChargeUpdateParamsPaymentDetailsMoneyServices(TypedDict): - account_funding: NotRequired[ - "Literal['']|ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFunding" - ] - """ - Account funding transaction details including sender and beneficiary information. - """ - transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" - ] - """ - The type of money services transaction. - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFunding(TypedDict): - beneficiary_account: NotRequired[str] - """ - ID of the Account representing the beneficiary in this account funding transaction. - """ - beneficiary_details: NotRequired[ - "Literal['']|ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails" - ] - """ - Inline identity details for the beneficiary of this account funding transaction. - """ - sender_account: NotRequired[str] - """ - ID of the Account representing the sender in this account funding transaction. - """ - sender_details: NotRequired[ - "Literal['']|ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails" - ] - """ - Inline identity details for the sender of this account funding transaction. - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails( - TypedDict, -): - address: NotRequired[ - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails( - TypedDict, -): - address: NotRequired[ - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class ChargeUpdateParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - class ChargeUpdateParamsPaymentDetailsSubscription(TypedDict): affiliate: NotRequired[ "ChargeUpdateParamsPaymentDetailsSubscriptionAffiliate" diff --git a/stripe/params/_gift_card_activate_params.py b/stripe/params/_gift_card_activate_params.py new file mode 100644 index 000000000..e43d15b36 --- /dev/null +++ b/stripe/params/_gift_card_activate_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class GiftCardActivateParams(RequestOptions): + balance: NotRequired["GiftCardActivateParamsBalance"] + """ + The initial balance to set on the gift card. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID to process the gift card operation on behalf of. + """ + + +class GiftCardActivateParamsBalance(TypedDict): + amount: int + """ + The initial balance amount to be loaded when activating the gift card, in the smallest currency unit + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ diff --git a/stripe/params/_gift_card_cashout_params.py b/stripe/params/_gift_card_cashout_params.py new file mode 100644 index 000000000..f2c5b9249 --- /dev/null +++ b/stripe/params/_gift_card_cashout_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardCashoutParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID to process the gift card operation on behalf of. + """ diff --git a/stripe/params/_gift_card_check_balance_params.py b/stripe/params/_gift_card_check_balance_params.py new file mode 100644 index 000000000..e5370a81b --- /dev/null +++ b/stripe/params/_gift_card_check_balance_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardCheckBalanceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID to process the gift card operation on behalf of. + """ diff --git a/stripe/params/_gift_card_create_params.py b/stripe/params/_gift_card_create_params.py new file mode 100644 index 000000000..4d68da056 --- /dev/null +++ b/stripe/params/_gift_card_create_params.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired + + +class GiftCardCreateParams(RequestOptions): + brand: Literal["fiserv_valuelink", "givex", "svs"] + """ + The brand of the gift card. + """ + exp_month: NotRequired[int] + """ + Two-digit number representing the gift card's expiration month. + """ + exp_year: NotRequired[int] + """ + Four-digit number representing the gift card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + number: NotRequired[str] + """ + The gift card number. + """ + pin: NotRequired[str] + """ + The gift card PIN. + """ diff --git a/stripe/params/_gift_card_operation_retrieve_params.py b/stripe/params/_gift_card_operation_retrieve_params.py new file mode 100644 index 000000000..a822f31be --- /dev/null +++ b/stripe/params/_gift_card_operation_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardOperationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_gift_card_reload_params.py b/stripe/params/_gift_card_reload_params.py new file mode 100644 index 000000000..c655ba7b4 --- /dev/null +++ b/stripe/params/_gift_card_reload_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardReloadParams(RequestOptions): + amount: int + """ + The amount to add to the gift card balance, in the smallest currency unit. + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID to process the gift card operation on behalf of. + """ diff --git a/stripe/params/_gift_card_retrieve_params.py b/stripe/params/_gift_card_retrieve_params.py new file mode 100644 index 000000000..297c51d18 --- /dev/null +++ b/stripe/params/_gift_card_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_gift_card_void_operation_params.py b/stripe/params/_gift_card_void_operation_params.py new file mode 100644 index 000000000..b487cded8 --- /dev/null +++ b/stripe/params/_gift_card_void_operation_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class GiftCardVoidOperationParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID to process the gift card operation on behalf of. + """ + operation: str + """ + The ID of the gift card operation to void. + """ diff --git a/stripe/params/_payment_attempt_record_report_canceled_params.py b/stripe/params/_payment_attempt_record_report_canceled_params.py index 50fdffbd0..2e96d353d 100644 --- a/stripe/params/_payment_attempt_record_report_canceled_params.py +++ b/stripe/params/_payment_attempt_record_report_canceled_params.py @@ -25,3 +25,7 @@ class PaymentAttemptRecordReportCanceledParams(RequestOptions): """ Payment evaluations associated with this reported payment. """ + reason: NotRequired[Literal["blocked_for_fraud"]] + """ + The reason the payment attempt was canceled. + """ diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py index 9ff79a198..fe4e9a385 100644 --- a/stripe/params/_payment_intent_capture_params.py +++ b/stripe/params/_payment_intent_capture_params.py @@ -417,12 +417,6 @@ class PaymentIntentCaptureParamsPaymentDetails(TypedDict): """ Lodging data for this PaymentIntent. """ - money_services: NotRequired[ - "Literal['']|PaymentIntentCaptureParamsPaymentDetailsMoneyServices" - ] - """ - Money services details for this PaymentIntent. - """ order_reference: NotRequired["Literal['']|str"] """ A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates. @@ -2375,196 +2369,6 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax( """ -class PaymentIntentCaptureParamsPaymentDetailsMoneyServices(TypedDict): - account_funding: NotRequired[ - "Literal['']|PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFunding" - ] - """ - Account funding transaction details including sender and beneficiary information. - """ - transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" - ] - """ - The type of money services transaction. - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFunding( - TypedDict, -): - beneficiary_account: NotRequired[str] - """ - ID of the Account representing the beneficiary in this account funding transaction. - """ - beneficiary_details: NotRequired[ - "Literal['']|PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails" - ] - """ - Inline identity details for the beneficiary of this account funding transaction. - """ - sender_account: NotRequired[str] - """ - ID of the Account representing the sender in this account funding transaction. - """ - sender_details: NotRequired[ - "Literal['']|PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails" - ] - """ - Inline identity details for the sender of this account funding transaction. - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails( - TypedDict, -): - address: NotRequired[ - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetails( - TypedDict, -): - address: NotRequired[ - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress" - ] - """ - Address. - """ - date_of_birth: NotRequired[ - "PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth" - ] - """ - Date of birth. - """ - email: NotRequired[str] - """ - Email address. - """ - name: NotRequired[str] - """ - Full name. - """ - phone: NotRequired[str] - """ - Phone number. - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsAddress( - TypedDict, -): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired[str] - """ - Address line 1, such as the street, PO Box, or company name. - """ - line2: NotRequired[str] - """ - Address line 2, such as the apartment, suite, unit, or building. - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - -class PaymentIntentCaptureParamsPaymentDetailsMoneyServicesAccountFundingSenderDetailsDateOfBirth( - TypedDict, -): - day: int - """ - Day of birth, between 1 and 31. - """ - month: int - """ - Month of birth, between 1 and 12. - """ - year: int - """ - Four-digit year of birth. - """ - - class PaymentIntentCaptureParamsPaymentDetailsSubscription(TypedDict): affiliate: NotRequired[ "PaymentIntentCaptureParamsPaymentDetailsSubscriptionAffiliate" diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index e9fbdf397..5b348f08e 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -663,7 +663,7 @@ class PaymentIntentConfirmParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this payment. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ @@ -4509,6 +4509,22 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBoleto(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired["Literal['']|Literal['manual']"] """ Controls when the funds are captured from the customer's account. @@ -4650,6 +4666,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay( + TypedDict +): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments( TypedDict ): @@ -4758,12 +4781,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServi """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -4772,41 +4789,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServi """ -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -4970,6 +4952,22 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptio class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired[Literal["manual", "manual_preferred"]] """ Controls when the funds are captured from the customer's account. @@ -4992,6 +4990,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ request_reauthorization: NotRequired[Literal["if_available", "never"]] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. @@ -5004,6 +5006,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay( + TypedDict, +): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -5035,12 +5044,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMon """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -5049,41 +5052,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMon """ -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -5160,7 +5128,9 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCrypto(TypedDict): """ Specific configuration for this PaymentIntent when the mode is `deposit`. """ - mode: NotRequired[Literal["default", "deposit"]] + mode: NotRequired[ + Literal["default", "deposit", "transaction_verification"] + ] """ The mode of the crypto payment. """ @@ -5289,7 +5259,20 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsFpx(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsGiftCard(TypedDict): - pass + ignore_application_fee: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore the application fee on the PaymentIntent when redeeming this gift card. + """ + ignore_transfer_data: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ class PaymentIntentConfirmParamsPaymentMethodOptionsGiropay(TypedDict): diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index cbb08f93d..76f0ad4a8 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -811,7 +811,7 @@ class PaymentIntentCreateParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this payment. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ @@ -4635,6 +4635,22 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBoleto(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired["Literal['']|Literal['manual']"] """ Controls when the funds are captured from the customer's account. @@ -4776,6 +4792,11 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay(TypedDict): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired[bool] """ @@ -4882,12 +4903,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -4896,41 +4911,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ -class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -5092,6 +5072,22 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired[Literal["manual", "manual_preferred"]] """ Controls when the funds are captured from the customer's account. @@ -5114,6 +5110,10 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ request_reauthorization: NotRequired[Literal["if_available", "never"]] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. @@ -5126,6 +5126,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay( + TypedDict, +): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -5157,12 +5164,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -5171,41 +5172,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ -class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -5282,7 +5248,9 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCrypto(TypedDict): """ Specific configuration for this PaymentIntent when the mode is `deposit`. """ - mode: NotRequired[Literal["default", "deposit"]] + mode: NotRequired[ + Literal["default", "deposit", "transaction_verification"] + ] """ The mode of the crypto payment. """ @@ -5411,7 +5379,20 @@ class PaymentIntentCreateParamsPaymentMethodOptionsFpx(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsGiftCard(TypedDict): - pass + ignore_application_fee: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore the application fee on the PaymentIntent when redeeming this gift card. + """ + ignore_transfer_data: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ class PaymentIntentCreateParamsPaymentMethodOptionsGiropay(TypedDict): diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 41ec6baa7..b3aa1a215 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -660,7 +660,7 @@ class PaymentIntentModifyParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this payment. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ @@ -4484,6 +4484,22 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBoleto(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired["Literal['']|Literal['manual']"] """ Controls when the funds are captured from the customer's account. @@ -4625,6 +4641,11 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay(TypedDict): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired[bool] """ @@ -4731,12 +4752,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -4745,41 +4760,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ -class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -4941,6 +4921,22 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired[Literal["manual", "manual_preferred"]] """ Controls when the funds are captured from the customer's account. @@ -4963,6 +4959,10 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ request_reauthorization: NotRequired[Literal["if_available", "never"]] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. @@ -4975,6 +4975,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay( + TypedDict, +): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -5006,12 +5013,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -5020,41 +5021,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ -class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -5131,7 +5097,9 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCrypto(TypedDict): """ Specific configuration for this PaymentIntent when the mode is `deposit`. """ - mode: NotRequired[Literal["default", "deposit"]] + mode: NotRequired[ + Literal["default", "deposit", "transaction_verification"] + ] """ The mode of the crypto payment. """ @@ -5260,7 +5228,20 @@ class PaymentIntentModifyParamsPaymentMethodOptionsFpx(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsGiftCard(TypedDict): - pass + ignore_application_fee: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore the application fee on the PaymentIntent when redeeming this gift card. + """ + ignore_transfer_data: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ class PaymentIntentModifyParamsPaymentMethodOptionsGiropay(TypedDict): diff --git a/stripe/params/_payment_intent_update_crypto_refund_address_params.py b/stripe/params/_payment_intent_update_crypto_refund_address_params.py new file mode 100644 index 000000000..b3306117e --- /dev/null +++ b/stripe/params/_payment_intent_update_crypto_refund_address_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired + + +class PaymentIntentUpdateCryptoRefundAddressParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + network: Literal["base", "ethereum", "polygon", "solana", "sui", "tempo"] + """ + The blockchain network for the refund address. + """ + refund_address: str + """ + The wallet address that should receive refunds for deposits on the specified network. + """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 77c791986..a0f4015d9 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -659,7 +659,7 @@ class PaymentIntentUpdateParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this payment. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ @@ -4483,6 +4483,22 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBoleto(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired["Literal['']|Literal['manual']"] """ Controls when the funds are captured from the customer's account. @@ -4624,6 +4640,11 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay(TypedDict): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired[bool] """ @@ -4730,12 +4751,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -4744,41 +4759,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic """ -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -4940,6 +4920,22 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): + capture_by: NotRequired[ + Literal["auth_expiry", "end_of_day", "target_delay"] + ] + """ + Controls when funds are captured from the customer's account when `capture_method` is `automatic_delayed`. + + If omitted, funds are captured before the authorization expires. + """ + capture_delay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay" + ] + """ + The number of days or hours to delay the capture of the funds. You can set both days and hours as long as the total delay does not exceed 30 days. + + You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. + """ capture_method: NotRequired[Literal["manual", "manual_preferred"]] """ Controls when the funds are captured from the customer's account. @@ -4962,6 +4958,10 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ request_reauthorization: NotRequired[Literal["if_available", "never"]] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. @@ -4974,6 +4974,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay( + TypedDict, +): + days: NotRequired[int] + hours: NotRequired[int] + + class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -5005,12 +5012,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ The category of digital asset being acquired through this account funding transaction. """ - liquid_asset: NotRequired[ - "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset" - ] - """ - Details for a liquid asset (crypto or security) funding transaction. - """ wallet: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet" ] @@ -5019,41 +5020,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone """ -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAsset( - TypedDict, -): - crypto: NotRequired[ - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto" - ] - """ - Details for a cryptocurrency liquid asset funding transaction. - """ - security: NotRequired[ - "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity" - ] - """ - Details for a security liquid asset funding transaction. - """ - - -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetCrypto( - TypedDict, -): - currency_code: NotRequired[str] - """ - The cryptocurrency currency code (e.g. BTC, ETH). - """ - - -class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingLiquidAssetSecurity( - TypedDict, -): - ticker_symbol: NotRequired[str] - """ - The security's ticker symbol (e.g. AAPL). - """ - - class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWallet( TypedDict, ): @@ -5130,7 +5096,9 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCrypto(TypedDict): """ Specific configuration for this PaymentIntent when the mode is `deposit`. """ - mode: NotRequired[Literal["default", "deposit"]] + mode: NotRequired[ + Literal["default", "deposit", "transaction_verification"] + ] """ The mode of the crypto payment. """ @@ -5259,7 +5227,20 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsFpx(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsGiftCard(TypedDict): - pass + ignore_application_fee: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore the application fee on the PaymentIntent when redeeming this gift card. + """ + ignore_transfer_data: NotRequired[Literal["yes"]] + """ + Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ class PaymentIntentUpdateParamsPaymentMethodOptionsGiropay(TypedDict): diff --git a/stripe/params/_payment_record_report_payment_attempt_canceled_params.py b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py index c0048aa4f..677b6cfda 100644 --- a/stripe/params/_payment_record_report_payment_attempt_canceled_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py @@ -25,3 +25,7 @@ class PaymentRecordReportPaymentAttemptCanceledParams(RequestOptions): """ Payment evaluations associated with this reported payment. """ + reason: NotRequired[Literal["blocked_for_fraud"]] + """ + The reason the payment attempt was canceled. + """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 425105260..3708b8fa7 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -1835,7 +1835,7 @@ class SetupIntentConfirmParamsSetupDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this setup intent. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index a0524b9df..7299bc0ea 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -1967,7 +1967,7 @@ class SetupIntentCreateParamsSetupDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this setup intent. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index febd8086c..30919e11f 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -1805,7 +1805,7 @@ class SetupIntentModifyParamsSetupDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this setup intent. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index f15d8cfaf..7acd1e065 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -1804,7 +1804,7 @@ class SetupIntentUpdateParamsSetupDetailsBenefitFrMealVoucher(TypedDict): """ Whether to enable meal voucher benefit for this setup intent. """ - siret: str + siret: NotRequired[str] """ The 14-digit SIRET of the meal voucher acceptor. """ diff --git a/stripe/params/_tax_fund_list_params.py b/stripe/params/_tax_fund_list_params.py new file mode 100644 index 000000000..878865399 --- /dev/null +++ b/stripe/params/_tax_fund_list_params.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TaxFundListParams(RequestOptions): + created: NotRequired["TaxFundListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + +class TaxFundListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/_tax_fund_retrieve_params.py b/stripe/params/_tax_fund_retrieve_params.py new file mode 100644 index 000000000..c1b62e5de --- /dev/null +++ b/stripe/params/_tax_fund_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class TaxFundRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/__init__.py b/stripe/params/radar/__init__.py index 11ecbb25e..23c41cf53 100644 --- a/stripe/params/radar/__init__.py +++ b/stripe/params/radar/__init__.py @@ -8,8 +8,10 @@ AccountEvaluationCreateParams as AccountEvaluationCreateParams, AccountEvaluationCreateParamsLoginInitiated as AccountEvaluationCreateParamsLoginInitiated, AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetails as AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetails, + AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetailsData as AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetailsData, AccountEvaluationCreateParamsRegistrationInitiated as AccountEvaluationCreateParamsRegistrationInitiated, AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetails as AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetails, + AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetailsData as AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetailsData, AccountEvaluationCreateParamsRegistrationInitiatedCustomerData as AccountEvaluationCreateParamsRegistrationInitiatedCustomerData, ) from stripe.params.radar._account_evaluation_modify_params import ( @@ -33,6 +35,7 @@ CustomerEvaluationCreateParams as CustomerEvaluationCreateParams, CustomerEvaluationCreateParamsEvaluationContext as CustomerEvaluationCreateParamsEvaluationContext, CustomerEvaluationCreateParamsEvaluationContextClientDetails as CustomerEvaluationCreateParamsEvaluationContextClientDetails, + CustomerEvaluationCreateParamsEvaluationContextClientDetailsData as CustomerEvaluationCreateParamsEvaluationContextClientDetailsData, CustomerEvaluationCreateParamsEvaluationContextCustomerDetails as CustomerEvaluationCreateParamsEvaluationContextCustomerDetails, CustomerEvaluationCreateParamsEvaluationContextCustomerDetailsCustomerData as CustomerEvaluationCreateParamsEvaluationContextCustomerDetailsCustomerData, ) @@ -120,6 +123,10 @@ "stripe.params.radar._account_evaluation_create_params", False, ), + "AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetailsData": ( + "stripe.params.radar._account_evaluation_create_params", + False, + ), "AccountEvaluationCreateParamsRegistrationInitiated": ( "stripe.params.radar._account_evaluation_create_params", False, @@ -128,6 +135,10 @@ "stripe.params.radar._account_evaluation_create_params", False, ), + "AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetailsData": ( + "stripe.params.radar._account_evaluation_create_params", + False, + ), "AccountEvaluationCreateParamsRegistrationInitiatedCustomerData": ( "stripe.params.radar._account_evaluation_create_params", False, @@ -188,6 +199,10 @@ "stripe.params.radar._customer_evaluation_create_params", False, ), + "CustomerEvaluationCreateParamsEvaluationContextClientDetailsData": ( + "stripe.params.radar._customer_evaluation_create_params", + False, + ), "CustomerEvaluationCreateParamsEvaluationContextCustomerDetails": ( "stripe.params.radar._customer_evaluation_create_params", False, diff --git a/stripe/params/radar/_account_evaluation_create_params.py b/stripe/params/radar/_account_evaluation_create_params.py index 9746655a1..0740dfdb9 100644 --- a/stripe/params/radar/_account_evaluation_create_params.py +++ b/stripe/params/radar/_account_evaluation_create_params.py @@ -40,9 +40,32 @@ class AccountEvaluationCreateParamsLoginInitiated(TypedDict): class AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetails( TypedDict, ): - radar_session: str + data: NotRequired[ + "AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetailsData" + ] + """ + Raw client metadata fallback when Stripe.js is blocked. Required unless radar_session is provided. + """ + radar_session: NotRequired[str] + """ + ID for the Radar Session. Required unless data is provided. + """ + + +class AccountEvaluationCreateParamsLoginInitiatedClientDeviceMetadataDetailsData( + TypedDict, +): + ip: str + """ + The end user's IP address. Used for proxy detection and IP-clustering signals. + """ + referrer: NotRequired[str] + """ + The referring URL of the login or registration page. + """ + user_agent: NotRequired[str] """ - ID for the Radar Session associated with the account evaluation. + The User-Agent HTTP header. """ @@ -66,9 +89,32 @@ class AccountEvaluationCreateParamsRegistrationInitiated(TypedDict): class AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetails( TypedDict, ): - radar_session: str + data: NotRequired[ + "AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetailsData" + ] + """ + Raw client metadata fallback when Stripe.js is blocked. Required unless radar_session is provided. + """ + radar_session: NotRequired[str] + """ + ID for the Radar Session. Required unless data is provided. + """ + + +class AccountEvaluationCreateParamsRegistrationInitiatedClientDeviceMetadataDetailsData( + TypedDict, +): + ip: str + """ + The end user's IP address. Used for proxy detection and IP-clustering signals. + """ + referrer: NotRequired[str] + """ + The referring URL of the login or registration page. + """ + user_agent: NotRequired[str] """ - ID for the Radar Session associated with the account evaluation. + The User-Agent HTTP header. """ diff --git a/stripe/params/radar/_customer_evaluation_create_params.py b/stripe/params/radar/_customer_evaluation_create_params.py index 494d05d0f..5eac85b64 100644 --- a/stripe/params/radar/_customer_evaluation_create_params.py +++ b/stripe/params/radar/_customer_evaluation_create_params.py @@ -40,9 +40,32 @@ class CustomerEvaluationCreateParamsEvaluationContext(TypedDict): class CustomerEvaluationCreateParamsEvaluationContextClientDetails(TypedDict): - radar_session: str + data: NotRequired[ + "CustomerEvaluationCreateParamsEvaluationContextClientDetailsData" + ] + """ + Raw client metadata fallback in case a Radar Session is unavailable. + """ + radar_session: NotRequired[str] + """ + ID for the Radar Session. Required unless data is provided. + """ + + +class CustomerEvaluationCreateParamsEvaluationContextClientDetailsData( + TypedDict, +): + ip: str + """ + The end user's IP address. Used for proxy detection and IP-clustering signals. + """ + referrer: NotRequired[str] + """ + The referring URL of the login or registration page. + """ + user_agent: NotRequired[str] """ - ID for the Radar Session associated with the customer evaluation. + The User-Agent HTTP header. """ diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index 994ac8e0e..b68a798eb 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -13,6 +13,8 @@ CalculationCreateParamsCustomerDetailsAddress as CalculationCreateParamsCustomerDetailsAddress, CalculationCreateParamsCustomerDetailsTaxId as CalculationCreateParamsCustomerDetailsTaxId, CalculationCreateParamsLineItem as CalculationCreateParamsLineItem, + CalculationCreateParamsLineItemPerformanceLocationDetails as CalculationCreateParamsLineItemPerformanceLocationDetails, + CalculationCreateParamsLineItemPerformanceLocationDetailsAddress as CalculationCreateParamsLineItemPerformanceLocationDetailsAddress, CalculationCreateParamsShipFromDetails as CalculationCreateParamsShipFromDetails, CalculationCreateParamsShipFromDetailsAddress as CalculationCreateParamsShipFromDetailsAddress, CalculationCreateParamsShippingCost as CalculationCreateParamsShippingCost, @@ -293,6 +295,14 @@ "stripe.params.tax._calculation_create_params", False, ), + "CalculationCreateParamsLineItemPerformanceLocationDetails": ( + "stripe.params.tax._calculation_create_params", + False, + ), + "CalculationCreateParamsLineItemPerformanceLocationDetailsAddress": ( + "stripe.params.tax._calculation_create_params", + False, + ), "CalculationCreateParamsShipFromDetails": ( "stripe.params.tax._calculation_create_params", False, diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index bd27d1cdc..b9a6fca88 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -235,6 +235,12 @@ class CalculationCreateParamsLineItem(TypedDict): """ A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. """ + performance_location_details: NotRequired[ + "CalculationCreateParamsLineItemPerformanceLocationDetails" + ] + """ + Details of the performance location for this line item. Use this to specify an address directly instead of a tax location ID. + """ product: NotRequired[str] """ If provided, the product's `tax_code` will be used as the line item's `tax_code`. @@ -257,6 +263,42 @@ class CalculationCreateParamsLineItem(TypedDict): """ +class CalculationCreateParamsLineItemPerformanceLocationDetails(TypedDict): + address: "CalculationCreateParamsLineItemPerformanceLocationDetailsAddress" + """ + The address of the performance venue. + """ + + +class CalculationCreateParamsLineItemPerformanceLocationDetailsAddress( + TypedDict, +): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ + + class CalculationCreateParamsShipFromDetails(TypedDict): address: "CalculationCreateParamsShipFromDetailsAddress" """ diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index e735a3ce2..d128c1685 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -10,6 +10,36 @@ class CalculationLineItem(StripeObject): "tax.calculation_line_item" ) + class PerformanceLocationDetails(StripeObject): + class Address(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ + + address: Address + _inner_class_types = {"address": Address} + class TaxBreakdown(StripeObject): class Jurisdiction(StripeObject): country: str @@ -136,6 +166,10 @@ class TaxRateDetails(StripeObject): """ Indicates the line item represents a performance where the venue location might determine the tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If you provide this value for tax codes with an `optional` location requirement, it overrides the customer address. """ + performance_location_details: Optional[PerformanceLocationDetails] + """ + The address of the location where this line item's event or service takes place. Depending on the [tax code](https://docs.stripe.com/tax/tax-codes), providing a performance location is required, optional, or not supported. Use this to provide the address inline without pre-creating a [TaxLocation](https://docs.stripe.com/api/tax/location) object. Can't be used with `performance_location`. + """ product: Optional[str] """ The ID of an existing [Product](https://docs.stripe.com/api/products/object). @@ -160,4 +194,7 @@ class TaxRateDetails(StripeObject): """ The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource. """ - _inner_class_types = {"tax_breakdown": TaxBreakdown} + _inner_class_types = { + "performance_location_details": PerformanceLocationDetails, + "tax_breakdown": TaxBreakdown, + } diff --git a/stripe/tax/_transaction_line_item.py b/stripe/tax/_transaction_line_item.py index 2caa89d1e..65ed8274f 100644 --- a/stripe/tax/_transaction_line_item.py +++ b/stripe/tax/_transaction_line_item.py @@ -10,6 +10,36 @@ class TransactionLineItem(StripeObject): "tax.transaction_line_item" ) + class PerformanceLocationDetails(StripeObject): + class Address(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ + + address: Address + _inner_class_types = {"address": Address} + class Reversal(StripeObject): original_line_item: str """ @@ -40,6 +70,10 @@ class Reversal(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + performance_location_details: Optional[PerformanceLocationDetails] + """ + The address of the location where this line item's event or service takes place. Depending on the [tax code](https://docs.stripe.com/tax/tax-codes), providing a performance location is required, optional, or not supported. Use this to provide the address inline without pre-creating a [TaxLocation](https://docs.stripe.com/api/tax/location) object. Can't be used with `performance_location`. + """ product: Optional[str] """ The ID of an existing [Product](https://docs.stripe.com/api/products/object). @@ -68,4 +102,7 @@ class Reversal(StripeObject): """ If `reversal`, this line item reverses an earlier transaction. """ - _inner_class_types = {"reversal": Reversal} + _inner_class_types = { + "performance_location_details": PerformanceLocationDetails, + "reversal": Reversal, + }